6cb5bdacd2582d6241744485ab4d4749f045e4ce
Implemented missing functionality in the Set-Cookie parser: 1. Completed is_cookie_octet() function to properly validate cookie characters according to RFC 6265 (excludes CTLs, whitespace, DQUOTE, comma, semicolon, backslash) 2. Fixed http_parse_set_cookie() return type from void to int to properly report parsing errors 3. Implemented Path attribute parsing to extract cookie path restrictions 4. Fixed HttpOnly attribute bug where it was incorrectly set to false instead of true 5. Added path field to HTTP_SetCookie struct with have_path flag 6. Added missing return 0 statement for successful parsing 7. Exported Set-Cookie parser types and function to public API: - HTTP_WeekDay, HTTP_Month, HTTP_Date enums/struct - HTTP_SetCookie struct - http_parse_set_cookie() function All changes follow RFC 6265 specification for Set-Cookie header parsing.
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%