MINOR: http: implement http uri parser
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Jul 2021 08:48:44 +0000 (10:48 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 8 Jul 2021 15:08:57 +0000 (17:08 +0200)
commit89c68c8117dc18a2f25999428b4bfcef83f7069e
treeb1450cf4e89c11df13cfe2f35af22f139829347e
parent164ae4ad55bdd36d22cba8568227895ef5ddc086
MINOR: http: implement http uri parser

Implement a http uri parser type. This type will be used as a context to
parse the various elements of an uri.

The goal of this serie of patches is to factorize duplicated code
between the http_get_scheme/authority/path functions. A simple parsing
API is designed to be able to extract once each element of an HTTP URI
in order. The functions will be renamed in the following patches to
reflect the API change with the prefix http_parse_*.

For the parser API, the http_uri_parser type must first be
initialized before usage. It will register the URI to parse and detect
its format according to the rfc 7230.
include/haproxy/http-t.h
include/haproxy/http.h