elixir-plug / plug

Compose web applications with functions
https://hex.pm/packages/plug
Other
2.84k stars 582 forks source link

`strip_spaces` fails on `nil` since 1.15.0 #1180

Closed cpiemontese closed 10 months ago

cpiemontese commented 10 months ago

Hello!

Since v1.15.0 strip_spaces, and thus Plug.Conn.Utils.content_type, on a nil will fail with an ArgumentError whereas before it simply returned an :error.

I don't know if this is really an issue, given that content_type should be expected to just handle binary, but since I don't see it explicitly documented anywhere I wanted to report it

josevalim commented 10 months ago

I will add a guard but it will continue failing. :) Thank you!