Tags: jwerle/url.h
Tags
Change member ownership (#14) * get rid of useless multiplication by sizeof(char), because it is 1. ALWAYS! * use 'const size_t' for lenght, get rid of useless casts. initialize variables on definition, if possible. * free() works fine on NULL, so no separate NULL check is necessary. * fix typos. * add "-g" to Makefile. * change interface: make members const, add documentation for the public functions. * rewrite url.c to use simpler & correct parser, less memory allocations etc. * add generator program for char category table. * update comments, mark old functions as deprecated * update .gitignore * fix dependencies in Makefile * add category IPv6Char * progress to new parser implementation * simplify parsing of hostname & port * implement URL parser completely. Now it's time for testing. :-D * fix incorrect handling of / in URLs. Paths are not strictly RFC-compliant, yet. * re-implement all the API functions (but might behave differently now) * add a hack to keep the '/' at the beginning of the path. * fix test: '#' introduces the fragment, but itself is not part of it. * add handling of %xx encoding. (only for path, yet) * call decode_percent() also for the URL fragment, and test it. * add new char category for query keys an values * rever... QueryKey and QueryValue are not necessary anymore. * implement %-decoding of key-value pairs in query string. * remove debug output. * add more bizarre key-value pairs in test URL * add test for keys without value -> Oh, it is parsed not as expeced! * keys without value will return empty string "", not NULL. --------- Co-authored-by: roker <[email protected]> Co-authored-by: RokerHRO <[email protected]>