http: get CURLOPT_REQUEST_TARGET working with a HTTP proxy

Added test 1613 to verify.

Closes #6490
This commit is contained in:
Fabian Keil 2021-01-19 11:13:41 +01:00 committed by Daniel Stenberg
parent 86a95eb076
commit 0015e06151
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 57 additions and 3 deletions

View file

@ -2177,8 +2177,9 @@ CURLcode Curl_http_target(struct Curl_easy *data,
curl_url_cleanup(h);
/* url */
result = Curl_dyn_add(r, url);
/* target or url */
result = Curl_dyn_add(r, data->set.str[STRING_TARGET]?
data->set.str[STRING_TARGET]:url);
free(url);
if(result)
return (result);