Subject: RE: net_flags[4]

From: Pascal Cimon <[email-masked]>
Date: Sat, 12 Aug 2000 14:04:55 -0400

Turns out I was able to fix my problem, thanks to Tony Gale. I had applied
all the patches I could find from fwtk.org which fixed some sites originally
but the one mentionned in previous messages (www.perl.com, www.xml.com and
www.activestate.com) who stopped working recently. Tony sent me a diff file
of his http-gw that had the same patches applied to it. I went back to the
distribution http-gw and applied his patch. Now wether I had not applied the
patch properly originally, Tony' s diff included patches I did not have or
if Tony made some modification of his own that were not at fwtk.org I don't
know. I'm not experienced enough in C to review coding other then appliying
the patch itself but my problem is now fixed. Thanks for the info however,
we do have some IIS 4.0 servers behind our Proxy and I will verify if I we
have the same symptoms you mentionned. I've icluded a copy of Tony's diff
file in case you wanted to see the code. I hope Tony doesn't mind.

Thanks

Pascal Cimon
PCSNC for RCMP

-----Original Message-----
From: Ted Keller
To: Pascal Cimon
Cc: 'Tony Gale '; 'Larry Jackson '; 'Mario Misic '; [email-masked] '
Sent: 8/12/00 10:02 AM
Subject: RE: net_flags[4]

I'm wondering if this is a similar error condition I found with the
Apache
proxy server.

I had the situation where a number of IIS 4.0 sites (but not all of
them)
were not displaying behind my proxy server.  In investigating this
situation, I noted that the TCP/IP session was never terminated with a
the
trailing <fin> sequence.

What this translated to was the following....(loosly speaking)

The proxy server issues a network read request.  As each buffer was
read,
it was transferred to an output buffer.  When the the terminating <fin>
was received, the read request completed with an End of File condition.
At that time the output buffer is transferred to the client.

In researching the problem, I also looked at the http-gw code and noted
that it used very similar logic - that is - it required the EOF
condition
to complete the transmission to the client machine.

With out the trailing <fin> everything goes into a BIG wait status until
a TCP/IP timeout occurs - or your proxy detects an application timeout.

Well, you ask, why don't clients that are connected to the internet
directly have this problem?

I believe the clients understand the data contents of each type of item
that they are downloading.  For example, they detect the </HTML> at athe
end of an <HTML? tag - and then know that the html transfer is complete
-
hence don't look for the terminating EOF character.  The same thing goes
for gif, jpeg, .... other type of files.

How to get around this....

In apache - I created a set of patches to specifically NOT buffer input
and output read/write requests.  That is, each time I recieved a block
of
characters, I wrote them without buffering to the client.  I think a
similar thing can be implemented in http-gw.

Note - the final read (waiting for the <fin> still was not satisfied
until
a tcp/ip timeout occurs.  I worked around this by picking some
arbritrary
"timeout" period (120 seconds in most cases) which I would assume the
other end went away - and terminated my connection.

Note - the client was then fat, dumb, and happy.  The proxy server had a
few extra open connections (note - these can really increase
significantly
if a site sends no terminating <fin>s for all objects). - but my users
were happy.

hope this helps

ted keller

On Wed, 9 Aug 2000, Pascal Cimon wrote:

> [To be removed from this list send the message "unsubscribe
fwtk-users" in the
> BODY of a mail message to [email-masked].]
> 
>  Actually it's more then just messages in the logs. Some sites don't
come up
> at all in the browser. When I access www.perl.com or www.xml.com with
> http-gw they don't come up and I get the server unavailable error int
the
> browser and the netflag error in the fw logs. If I access the same
site from
> my firewall it works fine so it's not an access problem. If I point my
> firewall to the http-gw it stops working for those sites. All other
sites
> work fine and I've only noticed those two so far.
> 
> Pascal Cimon
> PCSNC for Royal Canadian Mounted Police
> 
> 
> -----Original Message-----
> From: Tony Gale
> To: Larry Jackson
> Cc: Mario Misic; [email-masked]
> Sent: 8/8/00 12:30 PM
> Subject: Re: net_flags[4]
> 
> [To be removed from this list send the message "unsubscribe
fwtk-users"
> in the
> BODY of a mail message to [email-masked].]
> 
> 
> On 08-Aug-2000 Larry Jackson wrote:
> > From: "Mario Misic" <[email-masked]>
> >>
> >> I already saw that even others have problem with http-gw.
> >>
> >> I have http-gw V2.1 and I got this error while I am trying to
> >> access
> >> www.xml.com .
> >>
> >> Network error: net_flags[4] set (read)
> >>
> >> I read in FAQs that it is probably bug in http-gw software, can
> >> someone
> >> advice me where to find patch if it exist, I tried to find it
> >> somewhere
> > but
> >> I didn't.
> >>
> >> Regards!
> >> Mario Misic
> > 
> > I also see these error messages in my logs.
> > Any progress on fixing the problem?
> 
> I was looking at this this morning, and frankly, it aint worth the
> effort.
> 
> Basically, the code is bad at propagating error conditions, and this
> message just catches this.
> 
> I did try fixing it, but you just end up chasing function return
> values through the code.
> 
> So, ignore the messages, and if they bother you comment them out of
> gio.c
> 
> -tony
> 
> 
> ---
> E-Mail: Tony Gale <[email-masked]>
> The shortest distance between any two puns is a straight line.
> 
> The views expressed above are entirely those of the writer
> and do not represent the views, policy or understanding of
> any other person or official body.
>