ExpressionEngine / Coilpack

ExpressionEngine + Laravel: a powerful combination
https://expressionengine.github.io/coilpack-docs/
MIT License
21 stars 3 forks source link

Fixed problem with header fix when header has colons in the content #8

Closed krytenuk closed 12 months ago

krytenuk commented 1 year ago

I found that the header fix had an issue with content containing colons, such as dates. I had a Set-Cookie header containing a date, Set-Cookie: exp_sessionid=xxxe; expires=Wed, 29 Nov 2023 13:24:20 GMT; Max-Age=3600; path=/; SameSite=Lax which had the colons removed with the current fix, Set-Cookie: exp_sessionid=823865ab553000096a9d85243f14f2c9b1c760ee; expires=Wed, 29 Nov 2023 132420 GMT; Max-Age=3600; path=/; SameSite=Lax

I have simply limited the header explode to 2 elements and reverted the other changes.

bryannielsen commented 12 months ago

Good catch! This looks good I'm just writing a test around it so we can be a little more confident in the fix. I'll push all that and a change log entry before I merge hopefully tomorrow.