Skip to content
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

Empty string instead of page content #514

Closed
cognita opened this issue Dec 17, 2018 · 1 comment
Closed

Empty string instead of page content #514

cognita opened this issue Dec 17, 2018 · 1 comment

Comments

@cognita
Copy link

cognita commented Dec 17, 2018

I'm trying to download a html page and I just get an empty string.

HTTP.get("http://stadtschreiber.ruhr/").to_s
=> ""

When using Net::HTTP, I get the data I am expecting:

Net::HTTP.get(URI("http://stadtschreiber.ruhr/"))[0..15]
=> "<!DOCTYPE html>\n"

http version: 4.0.0
ruby version: 2.5.3

@tarcieri
Copy link
Member

tarcieri commented Dec 17, 2018

Dupe of known bug #422.

The cause is the server is sending an Upgrade header:

Upgrade: h2,h2c

These are presently mishandled by this library due to a bug. See open PR #489 for a potential fix.

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

No branches or pull requests

2 participants