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

Re: Antwort: Re: [DeleGate-En] Problem with cgi and https POST method
09 Feb 2004 23:00:22 GMT     feedback@delegate.org (Yutaka Sato)
The DeleGate Project

Hi,

In message  on 02/10/04(04:39:53)
you p4ueqbdyi-ftxuvdbvu3x6.ml@delegate.org wrote:
 |thank you for the patch, but unfortunately we still have a problem  with the
 |termination of the filter. As you know there are not necessarily EOF in
 |POST-Messages.

The patch was to generate EOF to the filter program by closing the pipe
between DeleGate and a filter program at FTOSV.

 |We retrieved the message in the filter and stored it in a file
 |(only for testing).  Additionally we wrote a second message into a separate
 |file, when the storage terminated. Then we print the message to STDOUT and
 |delegate waits until timeouted. As a workaround we now use header-filter and
 |cause a failure of the server by not sending a http-header. Not so nice, but
 |working.

Are you sure that src/http.c is patched and recompiled ?
I tested with a simple configuration like follows and it works without
problem.

% delegated -P9999 -vv FTOSV=post.cfi

[post.cfi]
#!cfi
Content-Type: multipart/
CGI: /tmp/echocat.cgi
#####################

[/tmp/echocat.cgi]
#!/bin/sh

cat > /tmp/echocat.tmp
echo ""
cat /tmp/echocat.tmp
#####################


02/10 07:55:42.07 [22346] 1+1: HTTP => (localhost:80) POST / HTTP/1.0^M
02/10 07:55:42.07 [22347] 1+1: -- Fork(FTOSV): 22346 -> 22347
02/10 07:55:42.08 [22347] 1+1: #### execFilter[FTOSV] CFI
02/10 07:55:42.08 [22347] 1+1: ## CFI/http ##
02/10 07:55:42.08 [22346] 1+1: KeepAlive[11] = 1
02/10 07:55:42.08 [22346] 1+1: relayRequestBody1 done (10/10)
02/10 07:55:42.08 [22347] 1+1: ////////////////////////////
#!cfi
Content-Type: multipart/
CGI: /tmp/echocat.cgi

02/10 07:55:42.08 [22347] 1+1: ///////// MATCHED //////////
02/10 07:55:42.08 [22346] 1+1: TMPFILE(NULLFP) = (15) /home/y.sato/delegate/tmp/dg22346.3.1076367342
02/10 07:55:42.08 [22346] 1+1: >>>TMPFILE(NULLFP)>>>81bdbe0[15]
02/10 07:55:42.08 [22346] 1+1: ###### closeFDs(-1/81BDA70,17/81BDA70) 18
02/10 07:55:42.08 [22347] 1+1: TMPFILE(CFI-CONV) = (0) /home/y.sato/delegate/tmp/dg22347.3.1076367342
02/10 07:55:42.08 [22347] 1+1: >>>TMPFILE(CFI-CONV)>>>81be650[0]
02/10 07:55:42.08 [22347] 1+1: TMPFILE(CFI-CGI) = (1) /home/y.sato/delegate/tmp/dg22347.4.1076367342
02/10 07:55:42.08 [22347] 1+1: >>>TMPFILE(CFI-CGI)>>>81be7c0[1]
02/10 07:55:42.08 [22347] 1+1: PATH_TRANSLATED=
02/10 07:55:42.08 [22347] 1+1: addEnvf:overwrite sysgem_CGI[40][REMOTE_IDENT=-][REMOTE_IDENT=]
02/10 07:55:42.08 [22347] 1+1: addEnvf:overwrite sysgem_CGI[42][REQUEST_METHOD=POST][REQUEST_METHOD=]
02/10 07:55:42.08 [22347] 1+1: addEnvf:overwrite sysgem_CGI[43][REQUEST_URL=http://localhost][REQUEST_URL=]
02/10 07:55:42.08 [22347] 1+1: addEnvf:overwrite sysgem_CGI[46][SERVER_NAME=127.0.0.1][SERVER_NAME=localhost]
02/10 07:55:42.08 [22347] 1+1: addEnvf:overwrite sysgem_CGI[47][SERVER_PORT=9998][SERVER_PORT=80]
02/10 07:55:42.08 [22347] 1+1: TMPFILE(CFI-system_CGI) = (3) /home/y.sato/delegate/tmp/dg22347.5.1076367342
02/10 07:55:42.08 [22347] 1+1: >>>TMPFILE(CFI-system_CGI)>>>81be998[3]
02/10 07:55:42.08 [22347] 1+1: systemFilter[with buffered input = 10]: /tmp/echocat.cgi
02/10 07:55:42.08 [22347] 1+1: simple_relayf [15 -> 5] = 10
02/10 07:55:42.08 [22347] 1+1: PollIn.POLLHUP (15) errno=0
02/10 07:55:42.08 [22347] 1+1: PollIn(15,600000) = POLLHUP
02/10 07:55:42.08 [22347] 1+1: simple_relay [15 -> 5] = (0 -> 0) / 0
02/10 07:55:42.11 [22347] 1+1: wait systemFilter: 22348 ... 22348
02/10 07:55:42.11 [22347] 1+1: simple_relayf [3 -> 1] = 10
02/10 07:55:42.11 [22347] 1+1: simple_relay [3 -> 1] = (0 -> 0) / 0
02/10 07:55:42.11 [22347] 1+1: ## CFI-getBody[10/10] EOF=0xFF
02/10 07:55:42.11 [22347] 1+1: Content-Length: 10 -> 10 (186 - 176)
...


Cheers,
Yutaka
--
  D G   Yutaka Sato  http://www.delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller
  search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V