diff --git a/doc/configuration.txt b/doc/configuration.txt index 9364fa26a..8f9428372 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -7284,9 +7284,11 @@ http-request set-uri [ { if | unless } ] This rewrites the request URI with the result of the evaluation of format string . The scheme, authority, path and query string are all replaced - at once. This can be used to rewrite hosts in front of proxies, or to - perform complex modifications to the URI such as moving parts between the - path and the query string. + at once. This can be used to rewrite hosts in front of proxies, or to perform + complex modifications to the URI such as moving parts between the path and + the query string. If an absolute URI is set, it will be sent as is to + HTTP/1.1 servers. If it is not the desired behavior, the host, the path + and/or the query string should be set separately. See also "http-request set-path" and "http-request set-query". http-request set-var([, ...]) [ { if | unless } ] diff --git a/src/http_htx.c b/src/http_htx.c index d52ee5caf..de5a32177 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -390,6 +390,7 @@ int http_replace_req_uri(struct htx *htx, const struct ist uri) sl = http_get_stline(htx); ALREADY_CHECKED(sl); /* the stline exists because http_replace_stline() succeded */ + sl->flags &= ~HTX_SL_F_NORMALIZED_URI; if (!http_update_host(htx, sl, uri)) goto fail;