Closed ijunaid8989 closed 3 years ago
The issue seems to be at this place https://github.com/elixir-mint/mint/blob/master/lib/mint/http1.ex#L394.
the data is already a binary image and don't need passing
closing this in favour of https://github.com/keathley/finch/issues/111
I am trying to do Basic auth to y-camera which respond as server HTTPD. I started it off as
and
When I start passing messages to mint as
at this line https://github.com/elixir-mint/mint/blob/master/lib/mint/http1.ex#L394 in data,
one first receive it gives
"HTTP/1.0 200 OK\r\nServer: HTTPD\r\nPragma: no-cache\r\nCache-Control: no-cache\r\nContent-Type: image/jpeg\r\n\r\n"
and on receiving again it gives a binary image in data.but it got failed when it gets passed by decode method.
and on passing message again,
I see these results on this line https://github.com/elixir-mint/mint/blob/master/lib/mint/http1/response.ex#L7
This does pass the binary but with an error
the binary being passed is a valid one because I can save it to a file and its an image.
I have tried all the available options from https://erlang.org/doc/man/erlang.html#decode_packet-3
Which results into this
the same Basic auth do works in Postman, as well with HTTPoison and Hackney
and return an image, can you guide me?