fielding 99/08/14 02:21:20
Modified: src CHANGES
src/main http_protocol.c
Log:
Remove bogus error message when a redirect doesn't set Location.
Instead, use an empty string to avoid coredump if the error message
was supposed to include a location but doesn't.
Revision Changes Path
1.1422 +4 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1421
retrieving revision 1.1422
diff -u -r1.1421 -r1.1422
--- CHANGES 1999/08/14 08:35:43 1.1421
+++ CHANGES 1999/08/14 09:21:15 1.1422
@@ -1,5 +1,9 @@
Changes with Apache 1.3.9
+ *) Remove bogus error message when a redirect doesn't set Location.
+ Instead, use an empty string to avoid coredump if the error message
+ was supposed to include a location. [Roy Fielding]
+
*) Don't allow configure to include mod_auth_digest unless it is
explicitly requested, even if the user asked for all modules.
[Roy Fielding]
1.279 +7 -18 apache-1.3/src/main/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
retrieving revision 1.278
retrieving revision 1.279
diff -u -r1.278 -r1.279
--- http_protocol.c 1999/08/14 08:35:48 1.278
+++ http_protocol.c 1999/08/14 09:21:19 1.279
@@ -2450,24 +2450,13 @@
ap_clear_table(r->err_headers_out);
if (ap_is_HTTP_REDIRECT(status) || (status == HTTP_CREATED)) {
- if ((location != NULL) && *location) {
- ap_table_setn(r->headers_out, "Location", location);
- }
- else {
- /*
- * We're supposed to tell the client to go somewhere,
- * but the destination was omitted. Turn this into
- * a 500 status with an explanatory note in the error log.
- */
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
- "resource created or redirection requested "
- "(status=%03d) but no Location field set "
- "(URI=%s)",
- r->status, r->unparsed_uri);
- r->status = status = HTTP_INTERNAL_SERVER_ERROR;
- r->status_line = NULL;
- }
- }
+ if ((location != NULL) && *location) {
+ ap_table_setn(r->headers_out, "Location", location);
+ }
+ else {
+ location = ""; /* avoids coredump when printing, below */
+ }
+ }
r->content_language = NULL;
r->content_languages = NULL;