Article delegate-en <_A4498@delegate-en.ML_>
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[delegate-en/4498] [Reference:<_A4497@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: match for X-Request
01 Jul 2009 12:51:39 GMT Jens-Erik Hansen <puicqbdyi.ml@ml.delegate.org>


Hello Yutaka,

On 07/01/09 Yutaka Sato wrote:
> You are right.  Selecting a FTOCL filter over HTTP with CFI's "X-Request"
> condition has been disabled since 9.2.3-pre4, in which conditional CFI
> for FTOCL was modified to reduce the overhead of CFI, reducing the
> needless invocations of CFI process when the condition seems not true,
> but without seeing "X-Request" condition... 
> 
> I added a workaround to fix it as the enclosed patch in 9.9.4-pre9.
> I'm planning to replace the implementation of CFI script interpreter
> from a process to a light weight thread thus it will be really fixed 
> in near future.

thank you very much for your reply. Today I tried delegate 9.9.4-pre9
and I made some extraordinary experiences trying to accomplish my task
which leads me to the assumption that I made a mistake somewhere else.

First I tried to Filter for X-Request with delegated 9.9.4-pre9 but had
the same results as before. Than I tried to filter for "Content-type:
text/xml" but the filter never matched. After that I tried separately
two matchingNames which should never match "X-Request-Content-Type:
text/test" and "X-Request-Host: abc" but the filters always matched.

The http requests where always identical and the headers sent to the
client always look like these:
 1  Status-Line: HTTP/1.0 200 OK^M
 2  DeleGate-Ver: 9.9.4-pre9 (delay=0)^M
 3  X-Request-Original: POST /xmlrpc/data HTTP/1.0^M
 4  X-Request: POST /xmlrpc/data HTTP/1.0^M
 5  X-Request-Host: test.foo.org^M
 6  X-Request-User-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)^M
 7  X-Request-Content-Type: text/xml^M
 8  X-Request-Content-Length: 98^M
 9  Server: BaseHTTP/0.3 Python/2.5.4^M
10  Date: Wed, 01 Jul 2009 12:36:52 GMT^M
11  Content-type: text/xml^M
...

Because I'm a bit clueless I picked the relevant config and attached it
below.

delegated.cfg:
STLS=-fcl
CMAP="ToClientExtern.cfi:FTOCL:*:*:*"
MOUNT="/* http://192.168.1.10:9030/*
nvhost=test.foo.org,nvserv=test.foo.org,withssl"

ToClientExtern.cfi (all matchingNames tested separately):
#!cfi
Content-type: text/xml
X-Request-Content-Type: text/test
X-Request-Host: abc
X-Request: POST /xmlrpc/data HTTP/1.0
X-Request-Original: POST /xmlrpc/data HTTP/1.0

Header-Filter: -tee-n-v /dev/tty

My experience is that it does not make any difference if I use a ssl
connection between delegated and the client or not - the results are the
same.

Greetings
Jens

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