]> git.kaiwu.me - haproxy.git/commit
[MINOR] Allow to specify a domain for a cookie
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Fri, 23 May 2008 21:49:32 +0000 (23:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Dec 2009 22:53:24 +0000 (23:53 +0100)
commit8446cdef1cfdd0fe9ccc4367879f95290cf78026
tree5c5b16df72af23a7f2d6563289f0d92b727b34c8
parent9507a2b25be33772cc76ccd4ffad686fe16c216a
[MINOR] Allow to specify a domain for a cookie

This patch allows to specify a domain used when inserting a cookie
providing a session stickiness. Usefull for example with wildcard domains.

The patch adds one new variable to the struct proxy: cookiedomain.
When set the domain is appended to a Set-Cookie header.

Domain name is validated using the new invalid_domainchar() function.
It is basically invalid_char() limited to [A-Za-z0-9_.-]. Yes, the test
is too trivial and does not cover all wrong situations, but the main
purpose is to detect most common mistakes, not intentional abuses.

The underscore ("_") character is not RFC-valid but as it is
often (mis)used so I decided to allow it.
(cherry picked from commit efe3b6f524c5cc6328233941ca44247993342d71)
doc/configuration.txt
include/common/standard.h
include/types/proxy.h
src/cfgparse.c
src/proto_http.c
src/standard.c