WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally when the request body is empty, `handle_body` is only called for POST and PUT requests, since other methods shouldn't have `Content-Type` and `Content-Length` headers for empty bodies. But one case is missed in the empty body detection, an iolist containing empty binaries. The [gleam hackney wrapper](https://github.com/gleam-lang/hackney) represents empty bodies as `[<<>>]`, triggering this bug and causing gleam-lang/hackney#5.
This PR expands the empty body detection to check if the result of `iolist_to_binary` is empty.
0 commit comments