I did write a URL parser (including converting relative URLs into absolute) in C (I also wrote a simple HTTP client, and other protocols). However, it is only intended for use with a limited set of URI schemes (including "hashed" and "jar", both of which are unusual in the way they are handled).
Now, we can find bug in that one, and then if other people mention theirs too, and find bug in other one, then we can see how accurate your guess is.
However, there are other considerations. For one thing, WHATWG is not the only specification of the working of URLs, so not everyone will comply anyways. And, some features might be necessary or not necessary in specific applications.
(See the function called "scogem_parse_url" in the https://raw.githubusercontent.com/zzo38/scorpion/trunk/scoge... file.)
Now, we can find bug in that one, and then if other people mention theirs too, and find bug in other one, then we can see how accurate your guess is.
However, there are other considerations. For one thing, WHATWG is not the only specification of the working of URLs, so not everyone will comply anyways. And, some features might be necessary or not necessary in specific applications.