On Wed, Dec 23, 2009 at 10:40 PM, David Birdsong
<david.birds...@gmail.com> wrote:
> On Wed, Dec 23, 2009 at 10:07 PM, David Birdsong
> <david.birds...@gmail.com> wrote:
>> On Wed, Dec 23, 2009 at 9:57 PM, Willy Tarreau <w...@1wt.eu> wrote:
>>> On Wed, Dec 23, 2009 at 09:48:15PM -0800, David Birdsong wrote:
>>>> i see that POST is a valid httpchk parameter, but without ripping
>>>> twisted apart, i'm not sure how it could allow an empty POST through
>>>> to code that could return a 200 or 204.
>>>>
>>>> has anybody already gone through this?
>>>
>>> Never tested, but right now you can still post contents and headers,
>>> though it's a ugly hack. It consists in appending the headers and
>>> data after the HTTP version :
>>>
>>>        option httpchk POST /something HTTP/1.0\r\nContent-length:\ 
>>> 7\r\n\r\nfoo=bar
>>>
>> i was wondering if contents were allowed after the headers.  i'll give
>> it a shot.
>>
>
> ugly, and so far not working:
>  option httpchk POST /db_api/lucene_check.php  HTTP/1.0\r\n\r\n<?xml
> version="1.0" encoding="iso-8859-1"?> <methodCall>
> <methodName>query</methodName> <params> <param> <value>
> <string>kafjkdfajdfkjfkajdf</string> </value> </param> </params>
> </methodCall>
>
> if that line wrapped, i have it all on one line in the config.
>
> tcpdump shows only this much coming through:
> <tcpdump>
> POST /db_api/lucene_check.php HTTP/1.0
>
>
>
> <?xml
>
>
>
> HTTP/1.0 200 OK
> </tcpdump>

this can be dropped for now.  it turns out that twisted doesn't
actually return error codes when you instruct it to.  it puts the
error codes in the xml response for code to deal with but slaps a http
200 in the headers.

>>> I told you it was ugly :-)
>>>
>>> You may also have to specify a Host: header depending on your
>>> service, and maybe even a content-type. Find about it by trial
>>> and error. Please post your findings on the list, as I'm sure
>>> other people might be interested too.
>>>
>>> Regards,
>>> Willy
>>>
>>>
>>
>

Reply via email to