ruby / cgi

CGI is a large class, providing several categories of methods, many of which are mixed in from other modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions About Token and Path

xiaoge1001 opened this issue · comments

I looked at the following 2 specifications and got the following information:

2.2 Basic Rules
image

4.1.1. Syntax
image

The token and path cannot contain CTL. The regular expressions of the two are as follows:

TOKEN_RE = %r"\A[[!-~]&&[^()<>@,;:\\\"/?=\[\]{}]]+\z"
PATH_VALUE_RE = %r"\A[[ -~]&&[^;]]*\z"

What's the difference between the following two uses? How do you match CTLs?

[!-~]
[ -~]