nitrogen / simple_bridge

A simple, standardized interface library to Erlang HTTP Servers.
MIT License
112 stars 76 forks source link

Fix dialyzer erros for cowboy 2.9.0 #81

Open joaohf opened 1 year ago

joaohf commented 1 year ago

simple_bridge/src/cowboy_bridge_modules/cowboy_simple_bridge.erl

Line 117 Column 9: The variable _ can never match since previous clauses completely covered the type #{binary()=>binary() | maybe_improper_list(binary() | maybe_improper_list(any(),binary() | []) | byte(),binary() | [])} Line 166 Column 9: The pattern {'error', Reason} can never match the type {'more',binary(),#{'body_length':='undefined' | non_neg_integer(), ... Line 177 Column 9: The pattern {H, L} can never match the type 'HTTP/2'

joaohf commented 1 year ago

Hello,

I'm not sure if this PR is too specific for cowboy 2.9.0. Maybe yes. In fact, how does simple_bridge detect and work with cowboy versions ?