https://bugzilla.wikimedia.org/show_bug.cgi?id=62244
Faidon Liambotis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #19 from Faidon Liambotis <[email protected]> --- For completeness, copying from my postmortem: What happens is, manipulation of the Set-Cookie header from VCL was broken. Ori's code is: set_cookie_header = VRT_GetHdr(sp, HDR_RESP, "\013set-cookie:"); if (set_cookie_header == NULL) { // New header VRT_SetHdr(sp, HDR_RESP, "\013Set-Cookie:", cookie_out, vrt_magic_string_end); } else { // Append to existing header VRT_SetHdr(sp, HDR_RESP, "\013Set-Cookie:", set_cookie_header, "; ", cookie_out, vrt_magic_string_end); } While this looks correct on a first glance, it makes you wonder what would happen with multiple occurences of Set-Cookie. What happens is exactly what you observe: VRT_GetHdr() returns only one of them and VRT_SetHdr() sets all of them, essentially discarding all Set-Cookie headers but one. As for going forward: the std vmod has an std.collect() function to collect multiple headers into one, but I don't believe this would work with Set-Cookie. There's https://github.com/varnish/libvmod-header that's designed exactly to address this use case -- its description is "Varnish Module (vmod) for manipulation of duplicated headers (for instance multiple set-cookie headers)". We should probably use this instead. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
