Https urls can't be opened #16

Merged
merged 8 commits into from Sep 6, 2012

Conversation

Projects
None yet
2 participants
Contributor

samphippen commented Sep 6, 2012

I just tried opening a https url in 0.3.0 (the current version on rubygems) and it totally failed. I pulled the version from master and it doesn't work there, so I've written this spec to expose the behaviour. I'm now going to try and fix it.

samphippen added some commits Sep 6, 2012

Add a spec that exposes the failing behaviour
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Fix the https test
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Contributor

samphippen commented Sep 6, 2012

this looks more interesting than I had initially thought, the github examples from the readme all return 500...

Contributor

samphippen commented Sep 6, 2012

Done some investigation with wireshark, looks like we might need to add user agent and host headers by default.

samphippen added some commits Sep 6, 2012

Fix openssl context and host header
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Add a user agent if one hasn't been specified
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Update specs for new user agent header
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Now that we have a working library, we can have a working test
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Add some real world sites to the specs
Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Fix some more real world connection issues
specifically this didn't deal with the case where the server
used a local redirect instead of a global one

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
Contributor

samphippen commented Sep 6, 2012

In 945ee28 and b0a1a6c I've added some real world sites and some fixes for getting them to the test suite. This seems suitable given that the gem is used for opening real world sites.

tarcieri added a commit that referenced this pull request Sep 6, 2012

@tarcieri tarcieri merged commit dbc5492 into httprb:master Sep 6, 2012

1 check passed

default The Travis build passed
Details
Owner

tarcieri commented Sep 6, 2012

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment