httpc icon indicating copy to clipboard operation
httpc copied to clipboard

Input needed: Clear callbacks and lengths on requests

Open denravonska opened this issue 1 year ago • 2 comments

State: Do not merge. Need input before finalizing or discarding PR

I've been looking into fixing the issues with #7 and added state clearing when re-using non-yielding connections. This fixes the issue with requests not working when doing a GET after a HEAD (due to empty callbacks on the reused httpc_t instance). However, I have a feeling I'm missing something.

Q: Is this the correct approach? Q: Should additional fields be cleared? Q: Will this play nicely with yields?

Ignore the content_length field. I need it for my local tests but it will be cleaned up and removed.

denravonska avatar Apr 01 '24 07:04 denravonska

Answers:

  1. I think it's almost the right approach.
  2. I'm not sure, I don't have enough time to check at the moment and it has been a while since I've really done anything with the library.
  3. Not quite (I've added some comments to the review).

Thanks for the work!

howerj avatar Apr 03 '24 18:04 howerj

The approach in its current stage throws the parser off on sequential requests. Currently debugging this.

denravonska avatar Apr 04 '24 04:04 denravonska