ruslandoga / picohttpparser

Elixir bindings for h2o/picohttpparser
0 stars 0 forks source link

copy tests for :erlang.decode_packet(:http_bin | :httph_bin, ..., ...) from erlang/otp #3

Open ruslandoga opened 2 months ago

ruslandoga commented 2 months ago
ruslandoga commented 2 months ago

Here's how it's handled right now in the naive implementation:

iex(1)> PicoHTTPParser.parse("GET http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]/echo_components HTTP/1.1\r\nhost: orange\r\n\r\n")
{~c"GET", ~c"http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]/echo_components",
 1, [{~c"host", ~c"orange"}]}

more tests added in https://github.com/ruslandoga/picohttpparser/commit/947bb7c72bc9b710756f561b4d9685074ce20528