3

RFC7230, the new HTTP/1.1 specification, refers to VCHAR as visible ASCII characters. What are those characters specifically? The RFC specification doesn't mention that.

The US-ASCII spec in RFC20 doesn't also mention which characters are visible and which are not.

Community
  • 1
  • 1
juhist
  • 4,210
  • 16
  • 33

1 Answers1

4

I assume the visible characters are between hex 0x21 and hex 0x7E. If this assumption is correct, space (0x20) wouldn't be included, horizontal tab (0x09) wouldn't be included and DEL (0x7F) wouldn't be included.

This assumption is supported by the following definitions in RFC7230:

 field-value    = *( field-content / obs-fold )
 obs-fold       = CRLF 1*( SP / HTAB )
 field-content  = field-vchar [ 1*( SP / HTAB ) field-vchar ]
 field-vchar    = VCHAR / obs-text
 obs-text       = %x80-FF

This takes space characters separately into account, so that VCHAR doesn't need to include space and horizontal tab.

juhist
  • 4,210
  • 16
  • 33
  • 7
    Your assumption is correct. If you read RFC 7230 more carefully, [Section 1.2 Syntax Notation](https://tools.ietf.org/html/rfc7230#section-1.2) specifically states that the definition of `VCHAR` is referenced from [RFC 5234 Appendix B.1](https://tools.ietf.org/html/rfc5234#appendix-B.1), which defines `VCHAR` as `VCHAR = %x21-7E ; visible (printing) characters` – Remy Lebeau Sep 14 '18 at 23:00