Skip to content

Conversation

leecoder
Copy link

I think this general client library should be accepted nonstandard responses(#393).

@deanberris
Copy link
Member

I'm not quite comfortable with this direction of supporting non-standard server responses -- especially the part where you're supporting only '\n' instead of '\r\n' in header delimiters. I can understand the change to have an empty message status, but the rest I'm not so sure.

Is there a compelling reason (aside from being more forgiving of broken servers) for this? I'm happy to merge it, but I'd just like to understand how important it is to support broken HTTP servers to allow this change in.

@leecoder
Copy link
Author

For example, just eBay site

$ curl -si http://www.ebay.com/electronics|sed -e "s/\r/\\\\r/g"
HTTP/1.1 301 Moved Permanently
Location: http://www.ebay.com/rpp/electronics\r
\r

The end of status message does not meet CR.
Also, there are many similar examples.

Those server responses is out of control.
Nevertheless, I think it should be parsed.

@deanberris
Copy link
Member

Ouch. 😢

Alright, I'm convinced. Merging now.

LGTM

deanberris added a commit that referenced this pull request Jun 27, 2014
Fixes #393: enhancing response incremental parser
@deanberris deanberris merged commit f0eaf48 into cpp-netlib:0.11-devel Jun 27, 2014
leecoder pushed a commit to leecoder/cpp-netlib that referenced this pull request Apr 14, 2015
Fixes cpp-netlib#393: enhancing response incremental parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants