NTLM/SSL fixes by Taco IJsselmuiden <taco@varda.nl>

git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@155 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
Mark Janssen 2007-04-12 11:31:17 +00:00
parent a194b6a06c
commit 9fd5bfe8d5
4 changed files with 14 additions and 3 deletions

10
http.c
View file

@ -116,7 +116,7 @@ void proxy_protocol(PTSTREAM *pts)
/*
* Create the proxy CONNECT command into buf
*/
if (args_info.remproxy_given )
if (args_info.remproxy_given && !connected_with_remote_proxy)
{
if( args_info.verbose_flag )
message( "Tunneling to %s (remote proxy)\n", args_info.remproxy_arg );
@ -183,13 +183,19 @@ void proxy_protocol(PTSTREAM *pts)
analyze_HTTP(pts);
if (args_info.remproxy_given )
if (args_info.remproxy_given && !connected_with_remote_proxy)
{
connected_with_remote_proxy = 1;
/*
* Clean buffer for next analysis
*/
while ( strcmp( buf, "\r\n" ) != 0 ) readline(pts);
#ifdef USE_SSL
if (args_info.encrypt_flag )
stream_enable_ssl(pts);
#endif
if( args_info.verbose_flag )
message( "Tunneling to %s (destination)\n", args_info.dest_arg );
sprintf( buf, "CONNECT %s HTTP/1.0\r\n", args_info.dest_arg );