-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Updating hyper to 0.12.35 breaks the api::http::tests::request_write_body_invalid_call
test
#3685
Comments
|
I'm sorry you're having this issue! I'm happy to help however!
That's not the intention. When I look at the commits, I don't see anything that touched the
The changelog is still updated in the 0.12.x branch (0.12.33 is just when master started upgrading to I'm sorry you hate hyper (and discussing why is off-topic here, though I'd love to know more), but with some details, hopefully we can fix this! |
Thanks for offering to help!
Here some details: Right now we're using hyper 0.12.33. I've made sure that the sole action of updating to 0.12.35 causes the issue (as in, it works before, I do What the test does (from the point of view of hyper) is:
The code is here, but it is quite difficult to read: https://github.com/paritytech/substrate/blob/e3f57ff9c86866a040e2c1f5dbe0b994b103e5cd/core/offchain/src/api/http.rs Note that the test performs queries against a server that is also handled by hyper, so it is possible that a change on the server-side somehow influences the way the client behaves.
Sorry for the rudeness of the remark. As someone who is frequently cross-compiling and doing experiments of all kinds, I've had bad experiences with hyper that were related to TLS and tokio, and not to hyper itself. |
Ok, I believe I've identified the issue. There was a bug fix for the client when sending chunked bodies with a Unfortunately, as part of the fix, this noticed a bug where the body wasn't actually fully ignored (before 0.12.34). It would still be sent, just without any framing (not chunked encoded), but rather like a close-delimited message. However, that's not legal. Without a I see your test is sending |
@seanmonstar Thank you for your prompt response! I came to the same conclusion you did, within a minute of you :) |
Switching from GET to POST makes the test pass. |
Apparently the behaviour of the sender has changed in latest versions of hyper.
Unfortunately it's not documented in the CHANGELOG, which stopped at 0.12.33.
Pragmatically speaking, we call
send_data
on theBody
, then callpoll_ready
on that sameBody
, and it produces a "channel closed" error.I personally hate hyper and think we should replace it with something else, but the straight-forward solution is to figure out why that happens.
The text was updated successfully, but these errors were encountered: