Article delegate-en/894 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: A feature or a bug?
10 Oct 2000 21:06:03 GMT (Yutaka Sato)


On 10/11/00(04:24) you Max Tran <> wrote
in <_A893@delegate-en.ML_>
 |When I used the filter "FFROMCL= -tee /tmp/debug",  post requests from
 |Internet Explorer would time out.
 |Get requests has no problem and Netscape is unaffected.
 |When  POST requests,
 |are interrupted the output of my  filter shows that the content line
 |does not end with a carriage return
 |and a newline.  This may be a bug with IE or a result of the
 |interruption, but is there a workaround
 |to solve this problem, other than not to use these filters.

The behavior of IE is right in this case and Netscape seems not
following HTTP/1.1.

[RFC2068 says]
>    Note: certain buggy HTTP/1.0 client implementations generate an
>    extra CRLF's after a POST request. To restate what is explicitly
>    forbidden by the BNF, an HTTP/1.1 client must not preface or follow
>    a request with an extra CRLF.

Thus a POST message with a body which does not end with CLRF is very
legal.  The end of the body will be indicated by a "Content-Length"
header of the message.

Since the builtin-filter "-tee" just relays its input "line by line"
without interpreting what is relayed by itself, it does not
interpret "Conetnt-Length" header as well as other headers in a HTTP
message.  Introducing some input-timeout to "-tee" would be a possible
solution to cope not only with HTTP.

As long as you use your filter command directly like


no added information about the input data will be inherited by DeleGate
to the cmmand since the command is invoked before DeleGate receives
any of input data.
As a solution, you could interpret the "Content-Length" header in a
input message to recognize the size of the request message and not to
wait extra data.

Another solution is invoking your filter via CFI (Common Filter Interface)
like this:


[the contents of "tee.cfi" file]
Filter: -tee /tmp/debug

Through CFI, filter commands can detect the end of a HTTP message body
as EOF.
See explanations on CFI in Manual.txt for more details.

Yutaka Sato <>   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]