-
Notifications
You must be signed in to change notification settings - Fork 11
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
Client example hangs #34
Comments
|
|
If I use hyper I get this as body:
it isn't either able to handle the double |
Hm, so it's not a duplicate header, it's real nested chunked encoding? Well, I'm not sure how to handle that in any efficient way. |
I suspect that the rotor client does not work with any chunked response. This is a chunked example page and it does also hang: https://www.httpwatch.com/httpgallery/chunked/chunkedimage.aspx |
It looks like we need better debugging info :) The buffer limit is 16384, the size of the chunked image is 32k. |
Increasing the buffer size did not help. Another page I found also does not work: https://jigsaw.w3.org/HTTP/ChunkedScript If I switch to progressive mode the first two chunks are received and then the client again hangs. |
This helps debugging, in particular #34
Okay, I've fixed chunked encoding. At least in buffered mode. (Will fix progressive mode soon). As described in ipfs/kubo#2385 it's just wrong header, not wrong double character encoding. So I'm not sure why hyper fails. rotor-http should probably reject wrong headers anyway, but it would be nice if you try (or is there some public place to send request to?) |
@dignifiedquire I've just checked, The reason it works, it's because here is stated that checking last transfer encoding is good enough (to withstand some kinds of attacks). But if we are decoding chunked transfer encoding, a user might assume that rotor-http decodes any transfer encoding. @pyfisch, any thoughts? |
Thanks will check in the morning :) |
@tailhook: I think it is ok if we just decode chunked encoding. Maybe we should add a note to the docs. Note also that currently rotor-http can't serialize messages with a |
Thanks, so I got a bit further, but no full success yet.
|
Okay I was able to implement a version that solves Issue2: https://gist.github.com/dignifiedquire/6aadd79d970198d56171 but it still just hangs and prints nothing. Not sure how to go from here :/ |
Okay #36 solves the issue of handling ip4 addresses in the client example :) So I can confirm now that the chunked encoding is properly parsed now and I get the expected output printed to the console when running it. |
Does it hangs, without printing anything? (but previously it printed headers, right?) I think that go-ipfs may use TLS by default? |
This is what I get:
It seems independent of go-ipfs. I tried a simple static file server and the same hanging occurs. (And no go-ipfs does not use TLS by default as far as I know) |
For comparison, using
|
Hm, probably it's because localhost resolves to ipv6. I'm not sure why does it hang anyway. But that's the only difference I see. |
So the ipv6 pointer was correct. I have in my hosts file
for dealing with ipv6. When commenting those lines out everything works fine. |
Hm, so this is another case where error reporting is missing. |
Fixed progressive chunked encoding and error reporting on connection reset in ce45540 |
Hey, I'm trying out the example in
examples/client.rs
. It's running fine against the google.com address, but when trying it against my own server it will just hang after printing out the headers:The request when I use curl looks like this:
The text was updated successfully, but these errors were encountered: