[GH-ISSUE #783] Cookies not parsed correctly on the Cookies tab #777

Closed
opened 2026-03-03 19:21:48 +03:00 by kerem · 12 comments
Owner

Originally created by @pbartolome on GitHub (Feb 11, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/783

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

Version 2.17.0 (21700)

macOS Version? (Ex. mac 10.14)

10.15.7 (19H114)

Steps to reproduce

Inspect a request with a cookie value with some specific characters (E.g "==~"). In the Cookie's tab the cookie value is not parsed properly and discards everything after "==~"

Screenshots (optional)

Screenshot 2021-02-11 at 13 54 23

Screenshot 2021-02-11 at 13 54 29

Originally created by @pbartolome on GitHub (Feb 11, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/783 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) Version 2.17.0 (21700) ### macOS Version? (Ex. mac 10.14) 10.15.7 (19H114) ### Steps to reproduce Inspect a request with a cookie value with some specific characters (E.g "==\~"). In the Cookie's tab the cookie value is not parsed properly and discards everything after "==~" ### Screenshots (optional) ![Screenshot 2021-02-11 at 13 54 23](https://user-images.githubusercontent.com/2429905/107651845-41c56000-6c80-11eb-8e51-a7db8679a75a.png) ![Screenshot 2021-02-11 at 13 54 29](https://user-images.githubusercontent.com/2429905/107651876-4722aa80-6c80-11eb-8a0e-a1e0ddbbcb37.png)
kerem 2026-03-03 19:21:48 +03:00
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 11, 2021):

Thanks for the screenshot. I will fix it and send you a hotfix soon 👍

<!-- gh-comment-id:777531492 --> @NghiaTranUIT commented on GitHub (Feb 11, 2021): Thanks for the screenshot. I will fix it and send you a hotfix soon 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 12, 2021):

@pbartolome Please check this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Fix_Cookie_Parser.dmg

It fixes the cookie parser 😄

Screen Shot 2021-02-12 at 15 17 41 Screen Shot 2021-02-12 at 15 17 36
<!-- gh-comment-id:778064293 --> @NghiaTranUIT commented on GitHub (Feb 12, 2021): @pbartolome Please check this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Fix_Cookie_Parser.dmg It fixes the cookie parser 😄 <img width="803" alt="Screen Shot 2021-02-12 at 15 17 41" src="https://user-images.githubusercontent.com/5878421/107747519-1dce5100-6d4a-11eb-90c3-45a0598f6afd.png"> <img width="803" alt="Screen Shot 2021-02-12 at 15 17 36" src="https://user-images.githubusercontent.com/5878421/107747526-2030ab00-6d4a-11eb-9454-abf4632cd8cf.png">
Author
Owner

@pbartolome commented on GitHub (Feb 12, 2021):

@NghiaTranUIT Great, that was a quick fix!, it works now.
Just a suggestion, maybe the response should say "Set-Cookie" instead of "Cookies", It will be weird to have a "Cookie" header on a response ;)

Thanks!

<!-- gh-comment-id:778078005 --> @pbartolome commented on GitHub (Feb 12, 2021): @NghiaTranUIT Great, that was a quick fix!, it works now. Just a suggestion, maybe the response should say "Set-Cookie" instead of "Cookies", It will be weird to have a "Cookie" header on a response ;) Thanks!
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 12, 2021):

Ah right. Make sense. I will change the title 👍

<!-- gh-comment-id:778078593 --> @NghiaTranUIT commented on GitHub (Feb 12, 2021): Ah right. Make sense. I will change the title 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 12, 2021):

It's fixed in this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Better_UI_For_Helper_Tool.dmg

Thank you so much for the bug report 🙇

<!-- gh-comment-id:778218505 --> @NghiaTranUIT commented on GitHub (Feb 12, 2021): It's fixed in this beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Better_UI_For_Helper_Tool.dmg Thank you so much for the bug report 🙇
Author
Owner

@pbartolome commented on GitHub (Feb 15, 2021):

In the response, the Set-Cookie is still note quite correct. E.g the header response of https://samesite-sandbox.glitch.me/:

HTTP/1.1 304 Not Modified
Date: Mon, 15 Feb 2021 16:13:42 GMT
Connection: keep-alive
x-powered-by: Express
strict-transport-security: max-age=63072000; inlcudeSubdomains; preload
referrer-policy: strict-origin-when-cross-origin
set-cookie: ck03=vl03; SameSite=InvalidValue
set-cookie: ck00=vl00; Path=/
set-cookie: ck01=vl01; Path=/; Secure; SameSite=None
set-cookie: ck02=vl02; Path=/; SameSite=None
set-cookie: ck04=vl04; Path=/; SameSite=Lax
set-cookie: ck05=vl05; Path=/; SameSite=Strict
accept-ranges: bytes
cache-control: public, max-age=0
last-modified: Thu, 26 Mar 2020 12:31:57 GMT
etag: W/"28fe-17116d3e248"
Content-Length: 0

Proxyman is showing a list of cookies that are really cookie attributes:

ck03: vl03
SameSite: InvalidValue
ck00: vl00
Path: /
ck01: vl01
Path: /
Secure: 
SameSite: None
ck02: vl02
Path: /
SameSite: None
ck04: vl04
Path: /
SameSite: Lax
ck05: vl05
Path: /
SameSite: Strict

Splitting cookies with ; won't work to parse the Set-Cookie header. In that case a different strategy is needed

https://tools.ietf.org/html/rfc6265#section-4.1
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie

<!-- gh-comment-id:779324796 --> @pbartolome commented on GitHub (Feb 15, 2021): In the response, the Set-Cookie is still note quite correct. E.g the header response of [https://samesite-sandbox.glitch.me/](https://samesite-sandbox.glitch.me/): ``` HTTP/1.1 304 Not Modified Date: Mon, 15 Feb 2021 16:13:42 GMT Connection: keep-alive x-powered-by: Express strict-transport-security: max-age=63072000; inlcudeSubdomains; preload referrer-policy: strict-origin-when-cross-origin set-cookie: ck03=vl03; SameSite=InvalidValue set-cookie: ck00=vl00; Path=/ set-cookie: ck01=vl01; Path=/; Secure; SameSite=None set-cookie: ck02=vl02; Path=/; SameSite=None set-cookie: ck04=vl04; Path=/; SameSite=Lax set-cookie: ck05=vl05; Path=/; SameSite=Strict accept-ranges: bytes cache-control: public, max-age=0 last-modified: Thu, 26 Mar 2020 12:31:57 GMT etag: W/"28fe-17116d3e248" Content-Length: 0 ``` Proxyman is showing a list of cookies that are really cookie attributes: ``` ck03: vl03 SameSite: InvalidValue ck00: vl00 Path: / ck01: vl01 Path: / Secure: SameSite: None ck02: vl02 Path: / SameSite: None ck04: vl04 Path: / SameSite: Lax ck05: vl05 Path: / SameSite: Strict ``` Splitting cookies with `;` won't work to parse the Set-Cookie header. In that case a different strategy is needed https://tools.ietf.org/html/rfc6265#section-4.1 https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 16, 2021):

Look like I have to implement the Set-Cookie TableView like Safari Inspector

Screen Shot 2021-02-16 at 09 20 23
<!-- gh-comment-id:779539527 --> @NghiaTranUIT commented on GitHub (Feb 16, 2021): Look like I have to implement the Set-Cookie TableView like Safari Inspector <img width="1421" alt="Screen Shot 2021-02-16 at 09 20 23" src="https://user-images.githubusercontent.com/5878421/108010802-4f8c3400-7038-11eb-8597-efd02bd888ea.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 16, 2021):

At the first glance, I thought that I would like to implement like the following design, which you can collapse/expand their attributes for each Key-Value

Screen Shot 2021-02-16 at 10 09 12 Screen Shot 2021-02-16 at 10 14 23

However, we have to sacrifice the multiple-line and I don't think it's a good deal, since it's really difficult to copy a text if it's too long (has ...)

Let try my improvised build 😄 https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Better_UI_Set-Cookie.dmg

By this way, the multiple line is remained and it's easier to copy

Screen_Shot_2021-02-16_at_11_19_44
<!-- gh-comment-id:779575850 --> @NghiaTranUIT commented on GitHub (Feb 16, 2021): At the first glance, I thought that I would like to implement like the following design, which you can collapse/expand their attributes for each Key-Value <img width="1075" alt="Screen Shot 2021-02-16 at 10 09 12" src="https://user-images.githubusercontent.com/5878421/108014112-c416a100-703f-11eb-9796-501811088ccf.png"> <img width="1408" alt="Screen Shot 2021-02-16 at 10 14 23" src="https://user-images.githubusercontent.com/5878421/108014103-bf51ed00-703f-11eb-97ec-91ccb3e119f1.png"> However, we have to **sacrifice** the multiple-line and I don't think it's a good deal, since it's really difficult to copy a text if it's too long (has ...) Let try my improvised build 😄 https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Better_UI_Set-Cookie.dmg By this way, the multiple line is remained and it's easier to copy <img width="1512" alt="Screen_Shot_2021-02-16_at_11_19_44" src="https://user-images.githubusercontent.com/5878421/108018678-fa0d5280-704a-11eb-9d63-807be741d6ec.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 16, 2021):

@pbartolome let me know how you feels. Thanks 🙌

<!-- gh-comment-id:779575966 --> @NghiaTranUIT commented on GitHub (Feb 16, 2021): @pbartolome let me know how you feels. Thanks 🙌
Author
Owner

@pbartolome commented on GitHub (Feb 16, 2021):

much better, thanks for acting so fast to the reported feedback!

It seems that the Set-Cookie tab in the 'breakpoint' view has some bugs
Screenshot 2021-02-16 at 09 43 32

  • Deleting a row doesn't do anything
  • Key/Value change is not reflected in the response
  • Adding a new key/value doesn't show up in the response
<!-- gh-comment-id:779684707 --> @pbartolome commented on GitHub (Feb 16, 2021): much better, thanks for acting so fast to the reported feedback! It seems that the Set-Cookie tab in the 'breakpoint' view has some bugs ![Screenshot 2021-02-16 at 09 43 32](https://user-images.githubusercontent.com/2429905/108039024-d7277200-703b-11eb-941c-96ee8e64ac9c.png) - Deleting a row doesn't do anything - Key/Value change is not reflected in the response - Adding a new key/value doesn't show up in the response
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 16, 2021):

Thanks. It's a bug. I suppose that I should disable the Set-Cookie in the Response. So, you only can edit the SetCookie Value from the Header Tab.

The reason why I choose this way because it's really difficult to implement this feature. Maybe I will improve it later

<!-- gh-comment-id:779686627 --> @NghiaTranUIT commented on GitHub (Feb 16, 2021): Thanks. It's a bug. I suppose that I should disable the Set-Cookie in the Response. So, you only can edit the SetCookie Value from the Header Tab. The reason why I choose this way because it's really difficult to implement this feature. Maybe I will improve it later
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 17, 2021):

I fixed this issue here: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Fix_Set_Cookie_Breakpoint_And_Missing_Tabs_In_Compose.dmg

Thank you for raising the bug 😄 👍

<!-- gh-comment-id:780286250 --> @NghiaTranUIT commented on GitHub (Feb 17, 2021): I fixed this issue here: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.17.0_Fix_Set_Cookie_Breakpoint_And_Missing_Tabs_In_Compose.dmg Thank you for raising the bug 😄 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#777
No description provided.