jira-importer opened a new issue, #834:
URL: https://github.com/apache/httpcomponents-core/issues/834

   **[Christian 
Kohlschütter](https://issues.apache.org/jira/secure/[email protected])**
 opened 
**[HTTPCORE-99](https://issues.apache.org/jira/browse/HTTPCORE-99?redirect=false)**
 and commented
   
   A broken/malicious HTTP Server/CGI script etc. can cause
   HttpClient to stay in an infinite loop when reading HTTP Response headers
   (see [HTTPCLIENT-295](https://issues.apache.org/jira/browse/HTTPCLIENT-295) 
for a similar problem)
   
   This not clearly specified in RFC2616, but I suggest that HttpClient's
   behaviour in these situations should be changed to some more 
reliable/terminative.
   
   I see three possible ways to cause HttpClient to loop while parsing headers:
   
   1. The Header line does not terminate with CR/LF
   2. The Header line is folded into an infinite number of lines
   3. The number of Headers is infinite
   
   I therefore suggest three configurable parameters to set reasonable limits 
for
   1. Header Line length (max. 4096 bytes per line?)
   2. Header Value length (max. 4096 characters?)
   3. Number of headers (max. 1000 headers?)
   
   
   
   ---
   
   **Attachments:**
   - 
[ASF.LICENSE.NOT.GRANTED--httpparser.patch](https://issues.apache.org/jira/secure/attachment/12327046/ASF.LICENSE.NOT.GRANTED--httpparser.patch)
 (_47.71 kB_)
   - 
[ASF.LICENSE.NOT.GRANTED--httpparser.patch](https://issues.apache.org/jira/secure/attachment/12327043/ASF.LICENSE.NOT.GRANTED--httpparser.patch)
 (_14.52 kB_)
   - 
[ASF.LICENSE.NOT.GRANTED--pickyhttpparser.patch](https://issues.apache.org/jira/secure/attachment/12327044/ASF.LICENSE.NOT.GRANTED--pickyhttpparser.patch)
 (_10.03 kB_)
   - 
[ASF.LICENSE.NOT.GRANTED--responseheader.patch](https://issues.apache.org/jira/secure/attachment/12327042/ASF.LICENSE.NOT.GRANTED--responseheader.patch)
 (_10.19 kB_)
   - 
[ASF.LICENSE.NOT.GRANTED--responseheader-test.patch](https://issues.apache.org/jira/secure/attachment/12327041/ASF.LICENSE.NOT.GRANTED--responseheader-test.patch)
 (_9.86 kB_)
   - 
[ASF.LICENSE.NOT.GRANTED--testcase.patch](https://issues.apache.org/jira/secure/attachment/12327045/ASF.LICENSE.NOT.GRANTED--testcase.patch)
 (_10.10 kB_)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to