DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=33041>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33041 Summary: HttpParser fails to parse the cookie header that has a newline character in its value Product: HttpClient Version: 3.0 Final Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Commons HttpClient AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] The readRawLine() method of HttpParser.java parses the header assuming that only '/n' (LF) as the end of header message whereas the actual header delimiter specified in the RFC 2616 for HTTP is '/r/n' (CRLF). (Ref:- http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4) If a header's value has a newline character in it, then parsing the header next to the one that has newline will fail. This can be fixed with the following change in the code of readRawLine method. int prevch=-1; while ((ch = inputStream.read()) >= 0) { buf.write(ch); if ((ch == '\n') && (prevch=='\r')) { // Check for CR before LF & then break break; } prevch=ch; // Store the previous character } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
