diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-16 23:08:46 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-16 23:08:46 +0100 |
commit | 149f5dc44b699d8ed15ef076ea17306e09988d4c (patch) | |
tree | 8b06ab64d1c08ce1f772aa7fba303d6d9222278c /uclient-http.c | |
parent | 2c1cb6dcec5472088badfbda9b7a865660d4eef2 (diff) | |
download | uclient-149f5dc44b699d8ed15ef076ea17306e09988d4c.tar.gz |
http: add proxy support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient-http.c')
-rw-r--r-- | uclient-http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/uclient-http.c b/uclient-http.c index e456564..3ffb88c 100644 --- 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, |