]> granicus.if.org Git - apache/commitdiff
Calm some overly agressive crlf handling
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 29 Aug 2016 22:19:25 +0000 (22:19 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 29 Aug 2016 22:19:25 +0000 (22:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1758305 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 875bcbba66eed6cd2fcadceb4795156194290341..a674c92d09ef564813ebadf8ef50364f1f51568e 100644 (file)
@@ -329,7 +329,7 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
         }
     }
 
-    if (last_char <= *s || last_char[-1] != APR_ASCII_CR) {
+    if (crlf && (last_char <= *s || last_char[-1] != APR_ASCII_CR)) {
         *last_char = '\0';
         bytes_handled = last_char - *s;
         *read = bytes_handled;