W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2001

RE: https over proxy patch

From: Grushinskiy, Mikhail, NNAD <mgrushinskiy@att.com>
Date: Wed, 25 Jul 2001 14:42:47 -0400
Message-ID: <177C519EE5CCD31195390090278539D305430B24@njb140po04.ems.att.com>
To: Putz Doug <PutzDoug@JohnDeere.com>, www-lib@w3.org
My comments below :)

> I looked into some of the other items in your email and noted:
> 
> 1) Your changes 1 and 3 are already part of the https/proxy patch I
> obtained.
> 
	[MG]  

In the patch I have 

1)

	HTChannl.c free_channel() contains

	        /* https-proxy */
	        if (ch->htssl) {
	            HTSSL_free(ch->htssl);
	            ch->htssl = NULL;
	        }

and HTSSL_free(ch->htssl) frees memory being freed before.
My change removes the call HTSSL_free(ch->htssl). Check if
you have it in the patch.

	[MG]  

3) HTTPReq.c

Check if you have HT_FREE(me->url) in your patch,
(at least I don't have it in mine :)) This is what fixes a memory leak.

	             else if (method == METHOD_CONNECT) {
	               HT_FREE(me->url); /*MMMMM*/
	                 me->url = HTParse(addr, "", PARSE_HOST );


> 2) I'm not sure how the adding of HTTRACE(CORE_TRACE, "Host Event.. READ
> passed Before RETURN\n"); in the following snippet fixes the infinite loop
> you mentioned.
> 
	[MG]  

It moves "return ret;" outside 'if' so that return executes unconditionally,
and
it makes a difference in behavior (checked by experiments as well :) ).
I don't know if it can break anything, but it fixed this "loop" problem for
me.

> if (targetNet) {
>   HTTRACE(CORE_TRACE, "Host Event.. READ passed to `%s\'\n" _
>       HTAnchor_physical(HTRequest_anchor(HTNet_request(targetNet))));
>       if ((ret = (*targetNet->event.cbf)(HTChannel_socket(host->channel),
>                     targetNet->event.param, type)) != HT_OK)   return ret;
> }
>  
> I've changed it to:
> 
> if (targetNet) {
>   HTTRACE(CORE_TRACE, "Host Event.. READ passed to `%s\'\n" _
>       HTAnchor_physical(HTRequest_anchor(HTNet_request(targetNet))));
>       if ((ret = (*targetNet->event.cbf)(HTChannel_socket(host->channel),
>                     targetNet->event.param, type)) != HT_OK)
>             HTTRACE(CORE_TRACE, "Host Event.. READ passed Before
> RETURN\n");
> /*MMMMM*/
>       return ret;
> }
> 
> 3) Given your statement 
> 
>     "To make POST work I had to restore entityAnchor after CONNECT and
> before POST.
>      The entity anchor probably should be saved in a way similar to
> HTRequest_saveOrigMethod/
>      HTRequest_origMethod. I did it in my program code and it works,
> however
> generic
>      change should be probably made in libwww."
> 
>    I take it to mean that you have coded your own replacement for
> HTPostAnchor?
> 
	[MG]  
Yes, as well as proxy "before" and "after" filters

--Mikhail
Received on Wednesday, 25 July 2001 14:43:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:39 GMT