aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 5ffaa7305..601d8d364 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3987,9 +3987,17 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
last part of the URI. We are looking for the first '#' so that we deal
gracefully with non conformant URI such as http://example.com#foo#bar. */
fragment = strchr(path, '#');
- if(fragment)
+ if(fragment) {
*fragment = 0;
+ /* we know the path part ended with a fragment, so we know the full URL
+ string does too and we need to cut it off from there so it isn't used
+ over proxy */
+ fragment = strchr(data->change.url, '#');
+ if(fragment)
+ *fragment = 0;
+ }
+
/*
* So if the URL was A://B/C#D,
* protop is A