ref: bad75759948a72946a24831d66ef951d3e982558
parent: 128de9b9c07efa54e9cb5b0ae5f47b29e5916fdb
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Tue Nov 19 10:17:55 EST 2013
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.
--- a/src/http.c
+++ b/src/http.c
@@ -2216,6 +2216,7 @@
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);