]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] http: improve url_param pattern extraction to ignore empty values
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Jan 2011 13:57:34 +0000 (14:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Jan 2011 13:57:34 +0000 (14:57 +0100)
It's better to avoid sticking on empty parameter values, as this almost
always indicates a missing parameter. Otherwise it's easy to enter a
situation where all new visitors stick to the same server.

src/proto_http.c

index ec1e1808ae3856d68fb49f63bb9dceb2844b78f5..c5debcaff57a1e32efaf875c97aa14b3d161db82 100644 (file)
@@ -8340,7 +8340,7 @@ find_url_param_value(char* path, size_t path_l,
 
        *value = value_start;
        *value_l = value_end - value_start;
-       return 1;
+       return value_end != value_start;
 }
 
 static int