also, the read loops and write loops are duplication and unnecessary.
- POST's read loop doesn't check for NULL on realloc, potentially segfaulting.
- GET's read loop doesn't check for purposeful cancellation and treats that as an error condition
- GET's write loop doesn't report errors if they occur, just return NULL
it's all broken crap and needs major refactoring.
also, the read loops and write loops are duplication and unnecessary.
it's all broken crap and needs major refactoring.