httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r814723 - in /httpd/httpd/branches/2.2.x: STATUS modules/http/http_protocol.c
Date Mon, 14 Sep 2009 16:14:52 GMT
Author: wrowe
Date: Mon Sep 14 16:14:52 2009
New Revision: 814723

URL: http://svn.apache.org/viewvc?rev=814723&view=rev
Log:
Catch the somewhat absurd combination of a 417 error where no Expect header 
was present, on some platforms avoiding a segfault.

Backports: 814048, 814114
Reviewed by: wrowe, minfrin, covener

Modified:
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/http/http_protocol.c

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=814723&r1=814722&r2=814723&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Mon Sep 14 16:14:52 2009
@@ -135,13 +135,6 @@
    2.2.x patch: http://people.apache.org/~poirier/patch-2.2.x-PR30586.txt
    +1: poirier, minfrin
 
- * http_protocol: Catch the somewhat absurd combination of a 417 error where 
-   no Expect header was present, on some platforms avoiding a segfault.
-   Trunk Patch: http://svn.apache.org/viewvc?view=rev&revision=814048
-   +1: wrowe
-   rpluem says: Need to add r814114 to make it compile.
-   +1: minfrin, covener (with r814114)
-
  * htcacheclean: 19 ways to fail, 1 error message. Fixed.
    Trunk Patch: http://svn.apache.org/viewvc?view=rev&revision=814091
    +1: minfrin, covener, poirier

Modified: httpd/httpd/branches/2.2.x/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/http/http_protocol.c?rev=814723&r1=814722&r2=814723&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/http/http_protocol.c (original)
+++ httpd/httpd/branches/2.2.x/modules/http/http_protocol.c Mon Sep 14 16:14:52 2009
@@ -1005,16 +1005,19 @@
                "request-header field overlap the current extent\n"
                "of the selected resource.</p>\n");
     case HTTP_EXPECTATION_FAILED:
-        return(apr_pstrcat(p,
-                           "<p>The expectation given in the Expect "
-                           "request-header"
-                           "\nfield could not be met by this server.</p>\n"
-                           "<p>The client sent<pre>\n    Expect: ",
-                           ap_escape_html(r->pool, apr_table_get(r->headers_in, "Expect")),
-                           "\n</pre>\n"
-                           "but we only allow the 100-continue "
-                           "expectation.</p>\n",
-                           NULL));
+        s1 = apr_table_get(r->headers_in, "Expect");
+        if (s1)
+            s1 = apr_pstrcat(p,
+                     "<p>The expectation given in the Expect request-header\n"
+                     "field could not be met by this server.\n"
+                     "The client sent<pre>\n    Expect: ",
+                     ap_escape_html(r->pool, s1), "\n</pre>\n",
+                     NULL);
+        else
+            s1 = "<p>No expectation was seen, the Expect request-header \n"
+                 "field was not presented by the client.\n";
+        return add_optional_notes(r, s1, "error-notes", "</p>"
+                   "<p>Only the 100-continue expectation is supported.</p>\n");
     case HTTP_UNPROCESSABLE_ENTITY:
         return("<p>The server understands the media type of the\n"
                "request entity, but was unable to process the\n"



Mime
View raw message