1

Currently I have an issue with the parsing of Cookie headers. I am not sure if I understand the RFC 2109 (https://www.rfc-editor.org/rfc/rfc2109#page-9) correctly. My Cookie header looks like this:

JSESSIONID=<longId>; consent_technical=ALLOW; other_data=value;

In my requests there are empty spaces behind the last semicolon so essentially "JSESSIONID=; consent_technical=ALLOW; other_data=value; " is transferred to the server.

I am not sure if the RFC does specifiy that so please help me out to get this right:

  • Does the string has to end with a semicolon?
  • Is it valid to have spaces at the end after the last sign (whether it is a semicolon or not)?

Thanks

Community
  • 1
  • 1
Apollo
  • 1,296
  • 2
  • 11
  • 24

0 Answers0