#13002: Parse URLs Without Requiring Group-Capable Regex
--------------------------------+------------------------------
Reporter: apl-haiku | Owner: nobody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: Network & Internet | Version: R1/Development
Keywords: URL BUrl regex Mac | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
--------------------------------+------------------------------
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.
--
Ticket URL: <https://dev.haiku-os.org/ticket/13002>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.