Input needed: Clear callbacks and lengths on requests
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.
Answers:
- I think it's almost the right approach.
- 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.
- Not quite (I've added some comments to the review).
Thanks for the work!
The approach in its current stage throws the parser off on sequential requests. Currently debugging this.