From: Brian Havard Date: Sun, 8 Oct 2000 04:25:11 +0000 (+0000) Subject: Fix handling of LF only terminated header lines by not assuming the LF X-Git-Tag: APACHE_2_0_ALPHA_7~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a50e06a708c1e1cefa08458b397c99898a3a8764;p=apache Fix handling of LF only terminated header lines by not assuming the LF character will be followed by a 0. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86444 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 2f700ce43e..1f4b7a2373 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1023,7 +1023,7 @@ static int getline(char *s, int n, conn_rec *c, int fold) */ if ((toss = ap_strchr_c(temp, ASCII_LF)) != NULL) { length = toss - temp + 1; - e->split(e, length + 1); + e->split(e, length + (temp[length] == 0)); apr_cpystrn(pos, temp, length + 1); AP_BUCKET_REMOVE(e);