Mailing List Archive

cvs commit: apache-1.3/src/main util_script.c
ben 98/05/02 03:28:40

Modified: src/main util_script.c
Log:
Fix cockup with CGI status header.

Revision Changes Path
1.107 +5 -10 apache-1.3/src/main/util_script.c

Index: util_script.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/util_script.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- util_script.c 1998/04/11 12:00:32 1.106
+++ util_script.c 1998/05/02 10:28:39 1.107
@@ -474,8 +474,12 @@
r->content_type = ap_pstrdup(r->pool, l);
ap_str_tolower(r->content_type);
}
+ /*
+ * If the script returned a specific status, that's what
+ * we'll use - otherwise we assume 200 OK.
+ */
else if (!strcasecmp(w, "Status")) {
- sscanf(l, "%d", &r->status);
+ r->status = cgi_status = atoi(l);
r->status_line = ap_pstrdup(r->pool, l);
}
else if (!strcasecmp(w, "Location")) {
@@ -497,15 +501,6 @@
ap_update_mtime(r, mtime);
ap_set_last_modified(r);
}
- /*
- * If the script returned a specific status, that's what
- * we'll use - otherwise we assume 200 OK.
- */
- else if (!strcasecmp(w, "Status")) {
- ap_table_set(r->headers_out, w, l);
- cgi_status = atoi(l);
- }
-
/* The HTTP specification says that it is legal to merge duplicate
* headers into one. Some browsers that support Cookies don't like
* merged headers and prefer that each Set-Cookie header is sent