Commit f6764eb
committed
Fix parsing of httponly cookies
Parse cookies with #HttpOnly_ prefix according to the Netscape
cookie file format specification. Previously, all lines starting
with # were treated as comments, but lines starting with #HttpOnly_
indicate cookies with the HttpOnly attribute set.
The fix:
- Detects #HttpOnly_ prefix and strips it before parsing
- Adds httponly attribute to the cookie string
- Continues to treat regular # lines as comments
See: https://curl.se/docs/http-cookies.html
Fixes #1331 parent 61c2033 commit f6764eb
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| |||
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
0 commit comments