Skip to content

Fix Set-Cookie headers issue

Compare
Choose a tag to compare
@sf1152 sf1152 released this 12 Apr 20:40
· 7 commits to master since this release

Http request might contains a few "Set-Cookie" headers with different values. Current code merge headers with same key using ','. However, Some 'Set-Cookie' header value contains ',' as well. The issue is that after we store "Set-Cookie" headers to the scene, it's possible that we cant split them properly when we load from the scene. It will cause some matching function failure. The proper way to do is always use multi-map to store Http headers but it requires significant refactoring and will also make the code over complicated. One workaround is to encode all headers before we merge headers but it will lose readability for headers in the scene. So I'd like just encode "Set-Cookie" headers but not any other headers.