summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-07-17 08:52:35 +0000
committerStefan Fritsch <sf@apache.org>2011-07-17 08:52:35 +0000
commit02e91f38f651379d6d80c7898fd466e1666399b8 (patch)
tree26d17e4a0bc7d87125325f6680dccc1c84f4b47a
parentbeb3ea9c11ef0fb6396403120f29d9ab2cae3215 (diff)
downloadhttpd-02e91f38f651379d6d80c7898fd466e1666399b8.tar.gz
Fix parsing of Content-Length in type maps
PR: 42203 Submitted by: Nagae Hidetake <nagae eagan jp> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147557 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--modules/mappers/mod_negotiation.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 408ab07b7c..eab33cecbf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
Changes with Apache 2.3.14
+ *) mod_negotiation: Fix parsing of Content-Length in type maps. PR 42203.
+ [Nagae Hidetake <nagae eagan jp>]
+
*) core: Add more logging to ap_scan_script_header_err* functions. Add
ap_scan_script_header_err*_ex functions that take a module index for
logging.
diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c
index 101beeb27d..508d8f4ad8 100644
--- a/modules/mappers/mod_negotiation.c
+++ b/modules/mappers/mod_negotiation.c
@@ -996,12 +996,13 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
char *errp;
apr_off_t number;
- if (apr_strtoff(&number, body, &errp, 10)
+ body1 = ap_get_token(neg->pool, &body, 0);
+ if (apr_strtoff(&number, body1, &errp, 10) != APR_SUCCESS
|| *errp || number < 0) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"Parse error in type map, Content-Length: "
"'%s' in %s is invalid.",
- body, r->filename);
+ body1, r->filename);
break;
}
mime_info.bytes = number;