I have created a issue for this.

https://github.com/haproxy/haproxy/issues/589

On 19.04.20 00:15, Aleksandar Lazic wrote:
> Hi.
> 
> I haven't seen any option to log the request after the `http-request set-... 
> ` phase.
> 
> Is this covered in %HP or is this the request from the client?
> 
> That's the code and it looks to me that this isn't set after the rewrite 
> phase.
> 
> http://git.haproxy.org/?p=haproxy.git;a=blob;f=src/log.c;hb=dfad6a41ad9f012671b703788dd679cf24eb8c5a#l2693
> 
> The use case is that I need to know how the http request looks to the backend 
> after the backend.
> 
> A tcpdump isn't possible because the backend is a TLS one.
> 
> It would be nice to have also a similar output in the debug mode as for the 
> client request.
> 
> ```
> 
> 00000002:https-in.accept(0009)=002b from [::ffff:Client-IP:34452] ALPN=h2
> 00000002:https-in.clireq[002b:ffffffff]: GET 
> https://DOMAIN.com/img/logo-entrypages.png HTTP/2.0
> 00000002:https-in.clihdr[002b:ffffffff]: user-agent: curl/7.65.3
> 00000002:https-in.clihdr[002b:ffffffff]: accept: */*
> 00000002:https-in.clihdr[002b:ffffffff]: host: DOMAIN.com
> 
> Suggested output after rewrite
> 
> 00000002:https-out.connect(0010)=002b from [::ffff:DEST-IP:DEST-PORT] ALPN=h1
> 00000002:https-out.srvreq[002b:ffffffff]: GET 
> https://REWRITTEN.com/NEW_PATH/img/logo-entrypages.png HTTP/2.0
> 00000002:https-out.srvhdr[002b:ffffffff]: user-agent: curl/7.65.3
> 00000002:https-out.srvhdr[002b:ffffffff]: accept: */*
> 00000002:https-out.srvhdr[002b:ffffffff]: host: REWRITTEN.com
> 
> 00000002:be_static.srvrep[002b:002c]: HTTP/1.1 401 Unauthorized
> 00000002:be_static.srvhdr[002b:002c]: content-length: 131
> 00000002:be_static.srvhdr[002b:002c]: content-type: text/html; charset=UTF-8
> 00000002:be_static.srvhdr[002b:002c]: www-authenticate: Swift realm="Client"
> 00000002:be_static.srvhdr[002b:002c]: www-authenticate: Keystone 
> uri="https://auth.cloud.ovh.net/";
> 00000002:be_static.srvhdr[002b:002c]: x-trans-id: tx011f76ce9d9f43a09dcea-...
> 00000002:be_static.srvhdr[002b:002c]: x-openstack-request-id: 
> tx011f76ce9d9f43a09dcea-...
> 00000002:be_static.srvhdr[002b:002c]: date: Sat, 18 Apr 2020 21:59:48 GMT
> 00000002:be_static.srvhdr[002b:002c]: x-iplb-instance: ...
> 00000002:be_static.srvcls[002b:002c]
> 00000002:be_static.clicls[002b:002c]
> 00000002:be_static.closed[002b:002c]
> 
> ```
> 
> Opinions?
> 
> Regards
> 
> Aleks
> 


Reply via email to