This patch fixes the problem I had previously that I mentioned on the
Github issues.
Kyle
On 8/26/2015 1:23 PM, Denis Fondras wrote:
Hello,
While using httpd together uwsgi and Flask, I noticed that GET requests to /
returned 404. The same setup with nginx was returning 200.
The culprit is that PATH_INFO is not set when REQUEST_URI is /.
The following patch correctly set PATH_INFO in every case.
Denis
Index: httpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/httpd.c,v
retrieving revision 1.39
diff -u -p -r1.39 httpd.c
--- httpd.c 20 Aug 2015 13:00:23 -0000 1.39
+++ httpd.c 26 Aug 2015 18:12:34 -0000
@@ -695,7 +695,7 @@ path_info(char *path)
for (p = end; p > start; p--) {
/* Scan every path component from the end and at each '/' */
- if (p < end && *p != '/')
+ if (p <= end && *p != '/')
continue;
/* Temporarily cut the path component out */