without this fix httpd always put at least the first
path component in SCRIPT_NAME even when it did not exist.
Now for completely non-existant paths everything goes into
PATH_INFO.
-/* $OpenBSD: httpd.c,v 1.17 2014/08/05 15:36:59 reyk Exp $ */
+/* $OpenBSD: httpd.c,v 1.18 2014/08/13 08:08:55 chrisz Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
start = path;
end = start + strlen(path);
- for (p = end; p > start; p--) {
+ for (p = end; p >= start; p--) {
if (*p != '/')
continue;
if (stat(path, &st) == 0)