forked from macournoyer/ruby_http_parser
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Could not parse data entirely #29
Comments
@kenn Did you come to any conclusions on this problem? |
Nope, but to be honest I haven't been following either http_parser or em-http-request lately. |
I have the same problem, for me this error is raised when there is some binary body in the same string as headers, because this fails: parser = HTTP::Parser.new
parser.on_body { |chunk| }
parser << "HTTP/1.1 200 OK\r\nServer: gunicorn/19.7.0\r\nDate: Wed, 21 Jun 2017 06:26:07 GMT\r\nConnection: close\r\nTransfer-Encoding: chunked\r\nContent-Type: application/octet-stream\r\nAccess-Control-Allow-Origin: *\r\nAccess-Control-Allow-Credentials: true\r\n\r\n\xD8\xC2kB\x82g\xC8Mz\x95"
while this succeeds: parser = HTTP::Parser.new
parser.on_body { |chunk| }
parser << "HTTP/1.1 200 OK\r\nServer: gunicorn/19.7.0\r\nDate: Wed, 21 Jun 2017 06:25:27 GMT\r\nConnection: close\r\nAccept-Ranges: bytes\r\nETag: range1000\r\nContent-Type: application/octet-stream\r\nContent-Length: 1000\r\nContent-Range: bytes 0-999/1000\r\nAccess-Control-Allow-Origin: *\r\nAccess-Control-Allow-Credentials: true\r\n\r\nabcdefghijklmnopqrst" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved from igrigorik/em-http-request#240
em-http-request does not work for http://hashbang.ca/.
The following script:
...returns this error.
With telnet, I get the following response headers:
...where
Content-Security-Policy-Report-Only
looks odd. Could you give me any insights with the error?FYI, browsers and
net/http
works fine with the site.The text was updated successfully, but these errors were encountered: