summaryrefslogtreecommitdiffstats
path: root/modules/proxy/ajp_header.c
diff options
context:
space:
mode:
authorMartin Kraemer <martin@apache.org>2007-08-30 17:54:44 +0200
committerMartin Kraemer <martin@apache.org>2007-08-30 17:54:44 +0200
commitbfed1d7faeb83d7d97dd0e18727f4fcc061cfbee (patch)
tree59cc4ea1bb8e04848d020fb1302dd0ad024aa909 /modules/proxy/ajp_header.c
parentnsc extension not used (diff)
downloadapache2-bfed1d7faeb83d7d97dd0e18727f4fcc061cfbee.tar.xz
apache2-bfed1d7faeb83d7d97dd0e18727f4fcc061cfbee.zip
Convert just the message text to EBCDIC, and not the (already EBCDIC) status code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@571219 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/ajp_header.c')
-rw-r--r--modules/proxy/ajp_header.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c
index f48aa37fc7..44307a8930 100644
--- a/modules/proxy/ajp_header.c
+++ b/modules/proxy/ajp_header.c
@@ -51,7 +51,7 @@ static int sc_for_req_header(const char *header_name)
const char *p = header_name;
int i = 0;
- /* ACCEPT-LANGUAGE is the longest headeer
+ /* ACCEPT-LANGUAGE is the longest header
* that is of interest.
*/
if (len < 4 || len > 15)
@@ -69,11 +69,11 @@ static int sc_for_req_header(const char *header_name)
return SC_ACCEPT;
else if (header[6] == '-') {
p += 6;
- if (memcmp(p, "CHARSET", 7) == 0)
+ if (strcmp(p, "CHARSET") == 0)
return SC_ACCEPT_CHARSET;
- else if (memcmp(p, "ENCODING", 8) == 0)
+ else if (strcmp(p, "ENCODING") == 0)
return SC_ACCEPT_ENCODING;
- else if (memcmp(p, "LANGUAGE", 8) == 0)
+ else if (strcmp(p, "LANGUAGE") == 0)
return SC_ACCEPT_LANGUAGE;
else
return UNKNOWN_METHOD;
@@ -81,45 +81,45 @@ static int sc_for_req_header(const char *header_name)
else
return UNKNOWN_METHOD;
}
- else if (memcmp(p, "UTHORIZATION", 12) == 0)
+ else if (strcmp(p, "UTHORIZATION") == 0)
return SC_AUTHORIZATION;
else
return UNKNOWN_METHOD;
break;
case 'C':
- if(memcmp(p, "OOKIE2", 6) == 0)
+ if(strcmp(p, "OOKIE2") == 0)
return SC_COOKIE2;
- else if (memcmp(p, "OOKIE", 5) == 0)
+ else if (strcmp(p, "OOKIE") == 0)
return SC_COOKIE;
- else if(memcmp(p, "ONNECTION", 9) == 0)
+ else if(strcmp(p, "ONNECTION") == 0)
return SC_CONNECTION;
- else if(memcmp(p, "ONTENT-TYPE", 11) == 0)
+ else if(strcmp(p, "ONTENT-TYPE") == 0)
return SC_CONTENT_TYPE;
- else if(memcmp(p, "ONTENT-LENGTH", 13) == 0)
+ else if(strcmp(p, "ONTENT-LENGTH") == 0)
return SC_CONTENT_LENGTH;
else
return UNKNOWN_METHOD;
break;
case 'H':
- if(memcmp(p, "OST", 3) == 0)
+ if(strcmp(p, "OST") == 0)
return SC_HOST;
else
return UNKNOWN_METHOD;
break;
case 'P':
- if(memcmp(p, "RAGMA", 5) == 0)
+ if(strcmp(p, "RAGMA") == 0)
return SC_PRAGMA;
else
return UNKNOWN_METHOD;
break;
case 'R':
- if(memcmp(p, "EFERER", 6) == 0)
+ if(strcmp(p, "EFERER") == 0)
return SC_REFERER;
else
return UNKNOWN_METHOD;
break;
case 'U':
- if(memcmp(p, "SER-AGENT", 9) == 0)
+ if(strcmp(p, "SER-AGENT") == 0)
return SC_USER_AGENT;
else
return UNKNOWN_METHOD;
@@ -558,7 +558,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
apr_table_add(r->headers_out, stringname, value);
/* Content-type needs an additional handling */
- if (memcmp(stringname, "Content-Type", 12) == 0) {
+ if (strncasecmp(stringname, "Content-Type", 12) == 0) {
/* add corresponding filter */
ap_set_content_type(r, apr_pstrdup(r->pool, value));
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,