]> granicus.if.org Git - apache/commitdiff
Fix handling of LF only terminated header lines by not assuming the LF
authorBrian Havard <bjh@apache.org>
Sun, 8 Oct 2000 04:25:11 +0000 (04:25 +0000)
committerBrian Havard <bjh@apache.org>
Sun, 8 Oct 2000 04:25:11 +0000 (04:25 +0000)
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

modules/http/http_protocol.c

index 2f700ce43ed0ff4097328be100b5a642cae07a1f..1f4b7a23731eadeac4a492c82910b3483001051b 100644 (file)
@@ -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);