Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 681770 Details for
Bug 900827
Apache httpd returns 500 status code instead of custom status code when using mod_proxy
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
patch.txt
patch.txt (text/plain), 2.78 KB, created by
Jean-Frederic Clere
on 2012-09-02 09:34:50 UTC
(
hide
)
Description:
patch.txt
Filename:
MIME Type:
Creator:
Jean-Frederic Clere
Created:
2012-09-02 09:34:50 UTC
Size:
2.78 KB
patch
obsolete
>--- modules/http/http_filters.c 2008/09/08 14:15:06 693107 >+++ modules/http/http_filters.c 2008/09/08 14:20:11 693108 >@@ -802,12 +802,21 @@ > { > char *end; > >- if (r->status_line >- && (strlen(r->status_line) <= 4 >+ if (r->status_line) { >+ int len = strlen(r->status_line); >+ if (len < 3 > || apr_strtoi64(r->status_line, &end, 10) != r->status >- || *end != ' ' >- || (end - 3) != r->status_line)) { >- r->status_line = NULL; >+ || (end - 3) != r->status_line >+ || (len >= 4 && ! apr_isspace(r->status_line[3]))) { >+ r->status_line = NULL; >+ } >+ /* Since we passed the above check, we know that length three >+ * is equivalent to only a 3 digit numeric http status. >+ * RFC2616 mandates a trailing space, let's add it. >+ */ >+ else if (len == 3) { >+ r->status_line = apr_pstrcat(r->pool, r->status_line, " "); >+ } > } > } > >--- modules/http/http_protocol.c 2008/09/08 14:15:06 693107 >+++ modules/http/http_protocol.c 2008/09/08 14:20:11 693108 >@@ -1232,16 +1232,28 @@ > const char *h1; > > /* Accept a status_line set by a module, but only if it begins >- * with the 3 digit status code >+ * with the correct 3 digit status code > */ >- if (r->status_line != NULL >- && strlen(r->status_line) > 4 /* long enough */ >- && apr_isdigit(r->status_line[0]) >- && apr_isdigit(r->status_line[1]) >- && apr_isdigit(r->status_line[2]) >- && apr_isspace(r->status_line[3]) >- && apr_isalnum(r->status_line[4])) { >- title = r->status_line; >+ if (r->status_line) { >+ char *end; >+ int len = strlen(r->status_line); >+ if (len >= 3 >+ && apr_strtoi64(r->status_line, &end, 10) == r->status >+ && (end - 3) == r->status_line >+ && (len < 4 || apr_isspace(r->status_line[3])) >+ && (len < 5 || apr_isalnum(r->status_line[4]))) { >+ /* Since we passed the above check, we know that length three >+ * is equivalent to only a 3 digit numeric http status. >+ * RFC2616 mandates a trailing space, let's add it. >+ * If we have an empty reason phrase, we also add "Unknown Reason". >+ */ >+ if (len == 3) { >+ r->status_line = apr_pstrcat(r->pool, r->status_line, " Unknown Reason"); >+ } else if (len == 4) { >+ r->status_line = apr_pstrcat(r->pool, r->status_line, "Unknown Reason"); >+ } >+ title = r->status_line; >+ } > } > > /* folks decided they didn't want the error code in the H1 text */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 900827
: 681770 |
754195