Guess I am only concerned with the last ‘;’. Is this the standard way a cookie is set? If I do a curl on yahoo or google or any other site I don’t see a ‘;’ at the end of the string. Only with my f5.
RFC2109 doesn’t seem to suggest there should be a trailing ; at the end of the Set-Cookie attributes list. I’d guess that LTM shouldn’t be including it. You could open a case with F5 Support to check this.
In the meantime, you could try removing the trailing semi-colon using an iRule. I imagine this would eat up some CPU and memory though as it saves the Set-Cookie header values, removes the headers and then re-inserts them.
when HTTP_RESPONSE {
Insert some test headers with trailing semi-colons
HTTP::header insert "Set-Cookie" "cookie1=value1; path=/1; domain=.1.example.com;"
HTTP::header insert "Set-Cookie" "cookie2=value2; path=/2; domain=.2.example.com;"
Save the Set-Cookie headers to a TCL list
set cookie_headers [HTTP::header values "Set-Cookie"]
Remove all of the Set-Cookie headers
HTTP::header remove Set-Cookie
Loop through the list of Set-Cookie headers
foreach cookie_header $cookie_headers {
Check if the last character is a semi-colon
if {[string range $cookie_header end end] eq ";"}{
Insert the header without the semi-colon
HTTP::header insert Set-Cookie [string range $cookie_header 0 end-1]
} else {
Insert the original header
HTTP::header insert Set-Cookie $cookie_header
}
}
}