projects
/
project
/
uclient.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c1cb6d
)
http: add proxy support
author
Felix Fietkau
<
[email protected]
>
Sat, 16 Jan 2016 22:08:46 +0000
(23:08 +0100)
committer
Felix Fietkau
<
[email protected]
>
Sat, 16 Jan 2016 22:08:46 +0000
(23:08 +0100)
Signed-off-by: Felix Fietkau <
[email protected]
>
uclient-http.c
patch
|
blob
|
history
diff --git
a/uclient-http.c
b/uclient-http.c
index e4565642d83efa1bbd6e2a7995d868bf93d29a6b..3ffb88c001dfc4bd8d7219e87b898a2a03af398a 100644
(file)
--- a/
uclient-http.c
+++ b/
uclient-http.c
@@
-540,6
+540,9
@@
uclient_http_send_headers(struct uclient_http *uh)
if (uh->state >= HTTP_STATE_HEADERS_SENT)
return;
+ if (uh->uc.proxy_url)
+ url = uh->uc.proxy_url;
+
ustream_printf(uh->us,
"%s %s HTTP/1.1\r\n"
"Host: %s\r\n",
@@
-1116,6
+1119,7
@@
const struct uclient_backend uclient_backend_http = {
.connect = uclient_http_connect,
.disconnect = uclient_http_request_disconnect,
.update_url = uclient_http_free_url_state,
+ .update_proxy_url = uclient_http_free_url_state,
.read = uclient_http_read,
.write = uclient_http_send_data,