-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to fetch "http://" succeeds (!?) #40
Comments
I can't reproduce over here. With this program: import Network.HTTP.Client
main :: IO ()
main = do
man <- newManager defaultManagerSettings
req <- parseUrl "http://"
res <- httpLbs req man
print res I get:
Does this snippet make a successful request on your system? |
See also
|
Yes, it successfully runs a HTTP request against localhost on my Mac. |
I would guess that the proximal cause is a difference in the behaviour of |
Does ac48ffa restore sanity? |
It does, thanks. |
Please let me know when you issue a point release that contains this fix, so I can update my deps. Thanks again! |
Version 0.2.3 is now on Hackage. If I can ask, what made you notice this strange behavior? |
I'm writing a wrapper library for http-client, and I discovered this by accident while writing a unit test. |
Ahh, cool. Nice name :) |
This behaviour makes no sense to me.
The issue seems to be that
parseUrl
returns aRequest
with an emptyhost
field, and this gets interpreted aslocalhost
when it should be rejected, as e.g.curl
does:The text was updated successfully, but these errors were encountered: