Dear Jarno,

Thanks for the feedback on this.

I investigated further to find the solution to this issue. It turned out that not all PUT requests had a problem with filtering out the customerId parameter we're looking for.

Some requests seem to encode the HTTP PUT body somehow or have set some HTTP header which prevents haproxy from extracting the parameter.

I'm still trying to find out what exactly is different.

Best
Simon

Am 14.05.2018 um 14:40 schrieb Jarno Huuskonen:
Hi Simon,

On Mon, May 14, Simon Schabel wrote:
HA-Proxy version 1.7.5-2~bpo8+1 2017/05/27

The setting for the logging was done in the /default /section as:

    log-format %Ci:%Cp\ [%t]\ %ft\ %b/%s\ %Tq/%Tw/%Tc/%Tr/%Tt\ %st\
%B\ %cc\ %cs\ %tsc\ %ac/%fc/%bc/%sc/%rc\ %sq/%bq\ %hr\ %hs\
%[capture.req.hdr(0)]\ %{+Q}r
         option log-separate-errors
         option log-health-checks

and in the /http /and /https /section the body parameter capturing
is activated as:

     # enable HTTP body logging
         option http-buffer-request
         declare capture request len 4
         http-request capture req.body_param(customerId) id 0

As my haproxy version differs from yours I'm unsure where I might
made a configuration error.
I tested with 1.8.8 and 1.7.5 and with both versions I managed to
log customerId (with simple curl -X PUT/POST).

Are the POST/PUT requests large, is it possible that the customerId doesn't
fit in haproxy buffer (default 16k (I think)) ?

Can you test with curl to see if customerId is logged then:
curl -v -X PUT -d'customerId=911' http://yourhost.yourdomain/yourpath

# bigfile is some random file much larger than 16k
and curl -v -X PUT -d@bigfile -d'customerId=912' 
http://yourhost.yourdomain/yourpath

-Jarno


--
SEMKNOX GmbH
Simon Schabel
Webergasse 1, Haus B/1 · 01067 Dresden
simon.scha...@semknox.com · +49-351-32 123 102 · www.semknox.com


Reply via email to