Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Log-format %HU for http/2 requests

$
0
0

@joel-l wrote:

Hi!

I’m unsure whether this is a bug or me misunderstanding the documentation.

In haproxy 2.1.2:

According to the documentation, in log-format, %HU should be: HTTP request URI (ex: /foo?bar=baz)

But, for http/2 requests, the full url, including the protocol and hostname is logged instead (https://host/some/url, not /some/url, as I would expect).

For example:

log-format '{"host":"%[capture.req.hdr(0),json(ascii)]","url":"%{+E}HU"}'

Results in:

{"host":"example.com","url":"https://example.com/something"}

For HTTP/1.1 requests, the resulting url in the log is /something.

Is this something special with regards to how haproxy handles http/2 requests? And, what would be the easiest way to get the correct url into the log?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>