Commit bad75759 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry

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
......@@ -2216,6 +2216,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url,
if(_proxy_host!=NULL){
/*We need to establish a CONNECT tunnel to handle https proxying.
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_string(&_stream->proxy_connect,_stream->url.host);
ret|=op_sb_append_port(&_stream->proxy_connect,_stream->url.port);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment