737d81f270222423eba5d14e7750b090e3d926c3
This commit fixes multiple compilation errors introduced by the refactoring: 1. Added missing http_client_conn_free() helper function 2. Fixed cookie_jar reference (cookie_jar->count to client->cookie_jar.count) 3. Restored missing HTTP_ClientConn fields: handle, client, and url 4. Fixed undefined 'conn' variable in http_client_get_builder (changed to 'i') 5. Fixed incorrect field reference (entry.domain.len to domain.len) 6. Added missing closing parenthesis in should_send_cookie 7. Removed duplicate 'path' variable declaration 8. Fixed cookie jar access to use builder.client instead of conn->client 9. Fixed byte_queue_write calls to use .ptr and .len instead of HTTP_String structs 10. Fixed missing -> operators in url_to_connect_target 11. Fixed undefined 'url' variable by using conn->url 12. Fixed headers[i].value to set_cookie.value in save_one_cookie 13. Fixed typo: antry to entry 14. Fixed save_one_cookie parameter type (headers[i] instead of headers[i].value) 15. Fixed print_bytes calls to create HTTP_String structs 16. Added logic to store socket handle when connection is established 17. Updated http_client_get_builder signature to return HTTP_RequestBuilder 18. Updated simple_client.c example to match new API
cHTTP
This is an HTTP library for C, featuring an HTTP(S) server, HTTP(S) client, and much more!
Contributing
Contributions are welcome! The following are some notes on how to work with the codebase. Don't worry if you get something wrong. I will remind you.
The source code in the src/ directory is intended to be be amalgamated into a single file before compilation. The amalgamation is not only intended as a distribution method, but also as easy-access documentation, and therefore need to be readable. For this reasons:
- You never need need to include other cHTTP source files
- All inclusions of third-party headers are to be placed inside
src/includes.h - All files must start with a single empty line, unless they start with an overview comment of the file, in which case they must have no empty lines at the beginning of the file.
- All files must end with a single empty line.
Languages
C
98.9%
Python
0.9%
Makefile
0.2%