Permalink
Browse files

Accept http header with leading crlf.

	modified:   src/kilim/http/HttpRequest.java
  • Loading branch information...
1 parent 125d6f8 commit f543f8bd5cef473d7b8e03252684946d470d71c1 @sriram-srinivasan sriram-srinivasan committed Oct 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/kilim/http/HttpRequest.java
View
2 src/kilim/http/HttpRequest.java
@@ -194,7 +194,7 @@ public void readHeader(EndPoint endpoint) throws Pausable, IOException {
do {
n = readLine(endpoint); // includes 2 bytes for CRLF
headerLength += n;
- } while (n > 2); // until blank line (CRLF)
+ } while (n > 2 || headerLength <= 2); // until blank line (CRLF), but just blank line is not enough.
// dumpBuffer(buffer);
HttpRequestParser.initHeader(this, headerLength);
contentOffset = headerLength; // doesn't mean there's necessarily any content.

0 comments on commit f543f8b

Please sign in to comment.