You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not simple to split the headers['Set-Cookie'] string value with a comma because of the comma in the expires.
So I don't think it's appropriate to join the header values with a comma.
It'd better either that the headers[] should return a list of values, or the glue string should not be a comma.
The text was updated successfully, but these errors were encountered:
Working poorly with cookies is a known issue (#20). It's complicated by the fact that we don't have a good way of representing headers that supports people mostly accessing them as single key/value pairs but also supports accessing certain headers as multiple values.
Resurrecting an old issue here because even 5 years later, this is still cropping up. Incoming requests with multiple headers of the same name are joined with a comma and treated as a single header. We can't just split them back apart on commas because it's entirely possible to have a legitimate comma in the value of the header. #20 was linked above, but it's also still open. Is there a workaround for this?
Hi,
The headers in the response that has the same key are joined with a comma.
This can make a problem when a value has a comma.
For example,
The headers['X-Some-Header'] returns 'abc, def, ghi', and it's not possible to get the exact header values.
Especially the Set-Cookie header may have a comma in its value for the expires.
Let me show you some Set-Cookie headers(WordPress login cookies).
The headers['Set-Cookie'] returns a string value that concatenates those 'Set-Cookie' values like this.
It's not simple to split the headers['Set-Cookie'] string value with a comma because of the comma in the expires.
So I don't think it's appropriate to join the header values with a comma.
It'd better either that the headers[] should return a list of values, or the glue string should not be a comma.
The text was updated successfully, but these errors were encountered: