Vinelab / http

A smart, simple and fault-tolerant HTTP client for sending and receiving JSON and XML
57 stars 30 forks source link

Fixed header parsing for values containing colon #18

Closed ybr-nx closed 8 years ago

ybr-nx commented 8 years ago

Headers like:

Content-Type: application/json Content-Length: 94 Location: https://example.com/doma/path

were parsed as

[Content-Type] => application/json [Content-Length] => 94 [Location] => https

ybr-nx commented 8 years ago

Test fixed as sometimes PORT is added to "Host" header: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

Mulkave commented 8 years ago

Oh should've asked earlier, @ybr-nx does it mean that host without port doesn't work? Cause that's what I understood from your test fix?

ybr-nx commented 8 years ago

@Mulkave When we're talking about test, the yes, "Host" header was received with port.