summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2005-08-07 22:22:41 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2005-08-07 22:22:41 +0000
commit8edc43f14c60c92f0d4aa60e6b4259f65e30dfff (patch)
tree56757cf2011903aa4eea25c627da6cf99ad8c125
parentc41980978aabf65e109042cf3983ecbb7f9efe2b (diff)
downloadhttpd-8edc43f14c60c92f0d4aa60e6b4259f65e30dfff.tar.gz
End apr_natstrcasecmp, backporting part of r216111 (there may remain
other apr_natstrcasecmp abuse in other files). Still unsure if apr_strnatcasecmp of the hostname is deliberate to handle leading 0's in ip addresses, so leaving that single use case. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody-2.0.x@230708 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/proxy/proxy_http.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c
index 17b59b9522..82328b5dde 100644
--- a/modules/proxy/proxy_http.c
+++ b/modules/proxy/proxy_http.c
@@ -1014,20 +1014,20 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
|| headers_in[counter].val == NULL
/* Already sent */
- || !apr_strnatcasecmp(headers_in[counter].key, "Host")
+ || !strcasecmp(headers_in[counter].key, "Host")
/* Clear out hop-by-hop request headers not to send
* RFC2616 13.5.1 says we should strip these headers
*/
- || !apr_strnatcasecmp(headers_in[counter].key, "Keep-Alive")
- || !apr_strnatcasecmp(headers_in[counter].key, "TE")
- || !apr_strnatcasecmp(headers_in[counter].key, "Trailer")
- || !apr_strnatcasecmp(headers_in[counter].key, "Transfer-Encoding")
- || !apr_strnatcasecmp(headers_in[counter].key, "Upgrade")
+ || !strcasecmp(headers_in[counter].key, "Keep-Alive")
+ || !strcasecmp(headers_in[counter].key, "TE")
+ || !strcasecmp(headers_in[counter].key, "Trailer")
+ || !strcasecmp(headers_in[counter].key, "Transfer-Encoding")
+ || !strcasecmp(headers_in[counter].key, "Upgrade")
/* We'll add appropriate Content-Length later, if appropriate.
*/
- || !apr_strnatcasecmp(headers_in[counter].key, "Content-Length")
+ || !strcasecmp(headers_in[counter].key, "Content-Length")
/* XXX: @@@ FIXME: "Proxy-Authorization" should *only* be
* suppressed if THIS server requested the authentication,
@@ -1038,18 +1038,18 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
* code itself, not here. This saves us having to signal
* somehow whether this request was authenticated or not.
*/
- || !apr_strnatcasecmp(headers_in[counter].key,"Proxy-Authorization")
- || !apr_strnatcasecmp(headers_in[counter].key,"Proxy-Authenticate")) {
+ || !strcasecmp(headers_in[counter].key,"Proxy-Authorization")
+ || !strcasecmp(headers_in[counter].key,"Proxy-Authenticate")) {
continue;
}
/* for sub-requests, ignore freshness/expiry headers */
if (r->main) {
if (headers_in[counter].key == NULL || headers_in[counter].val == NULL
- || !apr_strnatcasecmp(headers_in[counter].key, "If-Match")
- || !apr_strnatcasecmp(headers_in[counter].key, "If-Modified-Since")
- || !apr_strnatcasecmp(headers_in[counter].key, "If-Range")
- || !apr_strnatcasecmp(headers_in[counter].key, "If-Unmodified-Since")
- || !apr_strnatcasecmp(headers_in[counter].key, "If-None-Match")) {
+ || !strcasecmp(headers_in[counter].key, "If-Match")
+ || !strcasecmp(headers_in[counter].key, "If-Modified-Since")
+ || !strcasecmp(headers_in[counter].key, "If-Range")
+ || !strcasecmp(headers_in[counter].key, "If-Unmodified-Since")
+ || !strcasecmp(headers_in[counter].key, "If-None-Match")) {
continue;
}
@@ -1065,9 +1065,8 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
* forever, waiting for a request body that will never
* arrive.
*/
- if ((r->method_number == M_GET) && headers_in[counter].key &&
- !apr_strnatcasecmp(headers_in[counter].key,
- "Content-Length")) {
+ if ((r->method_number == M_GET) && headers_in[counter].key
+ && !strcasecmp(headers_in[counter].key, "Content-Length")) {
continue;
}
}