Commit Diff


commit - be4f45b5bf0e1675373554243f024efb2d45a2e8
commit + d19d9fcec89a7d18ca8325b70f5edde7b4e6369a
blob - b4f85fc2121de39b9a1c7ff2f9fcab75f5b7da42
blob + 89fbdaf8d8a786bf4d6905228fbfa6fcc47cf03d
--- gotwebd/fcgi.c
+++ gotwebd/fcgi.c
@@ -261,12 +261,12 @@ fcgi_parse_params(uint8_t *buf, uint16_t n, struct req
 				*sd = '\0';
 		}
 
-		if (c->script_name[0] == '\0' &&
-		    val_len < MAX_SCRIPT_NAME &&
-		    name_len == 11 &&
-		    strncmp(buf, "SCRIPT_NAME", 11) == 0) {
-			memcpy(c->script_name, val, val_len);
-			c->script_name[val_len] = '\0';
+		if (c->document_uri[0] == '\0' &&
+		    val_len < MAX_DOCUMENT_URI &&
+		    name_len == 12 &&
+		    strncmp(buf, "DOCUMENT_URI", 12) == 0) {
+			memcpy(c->document_uri, val, val_len);
+			c->document_uri[val_len] = '\0';
 		}
 
 		if (c->server_name[0] == '\0' &&
blob - fc3b18bef37416ee4320885e46d8707a3291f6c2
blob + 38161394053fe7a7aca451c50b25e97bb1f80898
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
@@ -52,7 +52,7 @@
 
 /* GOTWEB DEFAULTS */
 #define MAX_QUERYSTRING		 2048
-#define MAX_SCRIPT_NAME		 255
+#define MAX_DOCUMENT_URI	 255
 #define MAX_SERVER_NAME		 255
 
 #define GOTWEB_GIT_DIR		 ".git"
@@ -224,7 +224,7 @@ struct request {
 
 	char				 querystring[MAX_QUERYSTRING];
 	char				 http_host[GOTWEBD_MAXTEXT];
-	char				 script_name[MAX_SCRIPT_NAME];
+	char				 document_uri[MAX_DOCUMENT_URI];
 	char				 server_name[MAX_SERVER_NAME];
 
 	uint8_t				 request_started;
blob - 6aca4b90f64838bba5e10738d6af4e2a01509ebf
blob + a822e44c28412ddbf85071a448bc1fca3266812d
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
@@ -53,7 +53,7 @@ gotweb_render_age(struct template *tp, time_t time, in
 	struct server		*srv = c->srv;
 	struct querystring	*qs = c->t->qs;
 	struct gotweb_url	 u_path;
-	const char		*prfx = c->script_name;
+	const char		*prfx = c->document_uri;
 	const char		*css = srv->custom_css;
 
 	memset(&u_path, 0, sizeof(u_path));