]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: http: use http uri parser for path
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Jul 2021 09:40:12 +0000 (11:40 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 8 Jul 2021 15:11:17 +0000 (17:11 +0200)
commitc453f9547e14c563f7bdf03d68979a5083c0372b
tree17db01f8ffa1fbe3da9cbab88677050a48ec451c
parent5a9bd375fda5e496271278af4b5cbf8ee5534420
MINOR: http: use http uri parser for path

Replace http_get_path by the http_uri_parser API. The new functions is
renamed http_parse_path. Replace duplicated code for scheme and
authority parsing by invocations to http_parse_scheme/authority.

If no scheme is found for an URI detected as an absolute-uri/authority,
consider it to be an authority format : no path will be found. For an
absolute-uri or absolute-path, use the remaining of the string as the
path. A new http_uri_parser state is declared to mark the path parsing
as done.
12 files changed:
include/haproxy/h1_htx.h
include/haproxy/http-t.h
include/haproxy/http.h
src/backend.c
src/hlua.c
src/http.c
src/http_act.c
src/http_ana.c
src/http_fetch.c
src/http_htx.c
src/log.c
src/mux_fcgi.c