On Sun, Aug 30, 2015 at 08:40:57PM +0200, Joerg Jung wrote: > On Wed, Aug 26, 2015 at 08:23:22PM +0200, 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. > > Yes, I think your proposed diff is right. > I would like to see this committed, any dev willing to give OK?
Ping, anyone? > Thanks, > Regards, > Joerg > > > > 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 */ > >