Skip to content
Snippets Groups Projects
Commit bad75759 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry
Browse files

Reset buffer before building a CONNECT request.

Otherwise redirects we'll stuff two requests into the same buffer
 if there's a redirect to another https URL via a proxy.
parent 128de9b9
No related branches found
No related tags found
No related merge requests found
...@@ -2216,6 +2216,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, ...@@ -2216,6 +2216,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url,
if(_proxy_host!=NULL){ if(_proxy_host!=NULL){
/*We need to establish a CONNECT tunnel to handle https proxying. /*We need to establish a CONNECT tunnel to handle https proxying.
Build the request we'll send to do so.*/ Build the request we'll send to do so.*/
_stream->proxy_connect.nbuf=0;
ret=op_sb_append(&_stream->proxy_connect,"CONNECT ",8); ret=op_sb_append(&_stream->proxy_connect,"CONNECT ",8);
ret|=op_sb_append_string(&_stream->proxy_connect,_stream->url.host); ret|=op_sb_append_string(&_stream->proxy_connect,_stream->url.host);
ret|=op_sb_append_port(&_stream->proxy_connect,_stream->url.port); ret|=op_sb_append_port(&_stream->proxy_connect,_stream->url.port);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment