From 9797e4019bac868e05c981bd02bce571be1fd20a Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Mon, 18 Oct 2021 12:12:02 +0200 Subject: [PATCH] MINOR: halog: Add -qry parameter allowing to preserve the query string in -uX Our use-case for this is a dynamic application that performs routing based on the query string. Without this option all URLs will just point to the central entrypoint of this location, making the output completely useless. (cherry picked from commit 24b8d693b202b01b649f64ed878d8f9dd1b242e4) Signed-off-by: Willy Tarreau (cherry picked from commit b09bdeecdf202f91ade21a92cd6cb62baf914f12) Signed-off-by: Christopher Faulet --- contrib/halog/halog.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/halog/halog.c b/contrib/halog/halog.c index 5d25620..2d6c17f 100644 --- a/contrib/halog/halog.c +++ b/contrib/halog/halog.c @@ -117,7 +117,8 @@ struct url_stat { #define FILT_COUNT_COOK_CODES 0x40000000 #define FILT_COUNT_IP_COUNT 0x80000000 -#define FILT2_TIMESTAMP 0x01 +#define FILT2_TIMESTAMP 0x01 +#define FILT2_PRESERVE_QUERY 0x02 unsigned int filter = 0; unsigned int filter2 = 0; @@ -147,7 +148,7 @@ void usage(FILE *output, const char *msg) "Usage: halog [-h|--help] for long help\n" " halog [-q] [-c] [-m ]\n" " {-cc|-gt|-pct|-st|-tc|-srv|-u|-uc|-ue|-ua|-ut|-uao|-uto|-uba|-ubt|-ic}\n" - " [-s ] [-e|-E] [-H] [-rt|-RT