Closed DanGould closed 1 year ago
I see what is going on here. The server prints a single item, where it should be printing a list. Your pull request goes the other way, which isn't really what was intended. Give me a few minutes.
OK, the refactoring took a little longer than I might have liked, but it should be fixed now.
Tested as fixed. Parsing a list does seem to be in more of a spirit of OHTTP so the fix makes sense to me. Thank you.
In testing how OHTTP applies to an application I'm working on I came across this implementation but have had no luck getting a client-server connection yet. Tests pass on main (fc3f4c7) and tag v0.4.0, ohttp-sever runs properly, but ohttp-client fails following the readme with the following:
I've tracked this down to an issue with the following line in
decode_list
, specificallyusize::from(r.read_u16::<NetworkEndian>()?);
always seems to evaluate to0
in the following lines.https://github.com/martinthomson/ohttp/blob/fc3f4c787d1f6a6a87bf5194f7152cc906b02973/ohttp/src/lib.rs#L243-L252
@notmandatory was also able to replicate
I'm running rust version cargo 1.70.0 (ec8a8a0ca 2023-04-25) on intel macOS 13.4.1