Parse URLs Without Requiring Group-Capable Regex
|Reported by:||apl-haiku||Owned by:||nobody|
|Component:||Network & Internet||Version:||R1/Development|
|Keywords:||URL BUrl regex Mac||Cc:|
See #12952 for background.
At present, the BUrl class requires a "group capable" regex engine to be linked in order that it is able to parse URLs. This is because it uses the groups in the regex to pull out the components. This causes problems on some systems (eg; Mac) where the built-in regex library does not offer these features.
This patch re-implements the URL parsing so that it no longer uses regex pattern matching to extract the parts. Hopefully this will, in turn, mean that the Mac build no longer requires the GNU regex library. At least it will be a step in that direction.
As part of this work, I also noted that the parsing of URLs with IPv6 hosts was not working so I have also re-implemented the "authority" parse algorithm such that it is able to cope with IPv6 URLs.
I also have also implemented a number of unit tests at the same time.