Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie value in cookie section doesn't accept some value #132

Closed
jcamiel opened this issue Jan 18, 2021 · 2 comments
Closed

Cookie value in cookie section doesn't accept some value #132

jcamiel opened this issue Jan 18, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Jan 18, 2021

In the Hurl grammar, cookie value is defined as:

cookie-value 	= <(alphanum | "_" | "-" | "/" | "%" | "[" | "]")*>

In the MDN, cookie value is defined as:

A <cookie-value> can optionally be wrapped in double quotes and include any US-ASCII
characters excluding control characters, Whitespace, double quotes, comma, semicolon,
and backslash. Encoding: Many implementations perform URL encoding on cookie values,
however it is not required per the RFC specification. It does help satisfying the requirements
about which characters are allowed for <cookie-value> though.

So for instance, '.' (ascii single dot) should be accepted by Hurl.

The following Hurl file should be valid:

GET https://localhost:3443/api/mobile/options/ebill
[Cookies]
JSESSIONID: node0cxdeb15mm31e1oyoxzo2wcnn40.node0
HTTP/1.1 200

Actually, Hurl raises an error:

error: Parsing literal
  --> test.hurl:3:44
   |
 3 | JSESSIONID: node0cxdeb15mm31e1oyoxzo2wcnn40.node0
   |                                            ^ expecting 'line_terminator'
   |
@jcamiel jcamiel added the bug Something isn't working label Jan 18, 2021
@fabricereix
Copy link
Collaborator

fabricereix commented Jan 18, 2021

From the spec it seems that these 25 non-alphanumeric characters should be included

!	QUOTATION MARK (U+0022)
#	NUMBER SIGN (U+0023)
$	DOLLAR SIGN (U+0024)
%	PERCENT SIGN (U+0025)
&	AMPERSAND (U+0026)
'	APOSTROPHE (U+0027)	
(	LEFT PARENTHESIS (U+0028)	
)	RIGHT PARENTHESIS (U+0029)	
*	ASTERISK (U+002A)	
+	PLUS SIGN (U+002B)
-	HYPHEN-MINUS (U+002D)	
.	FULL STOP (U+002E)
/       SOLIDUS (U+002F)
:	COLON (U+003A)	
<	LESS-THAN SIGN (U+003C)
=	EQUALS SIGN (U+003D)	
>	GREATER-THAN SIGN (U+003E)	
?	QUESTION MARK (U+003F)
@	COMMERCIAL AT (U+0040)
[	LEFT SQUARE BRACKET (U+005B)	
]	RIGHT SQUARE BRACKET (U+005D)	
^	CIRCUMFLEX ACCENT (U+005E)	
_	LOW LINE (U+005F)	
`	GRAVE ACCENT (U+0060)
~	TILDE (U+007E)

@fabricereix
Copy link
Collaborator

implemented in #133 and #134

@lepapareil lepapareil added this to the 1.1.0 milestone Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants