beast icon indicating copy to clipboard operation
beast copied to clipboard

"Connection" header field value must start with upper case letter

Open harendt opened this issue 4 years ago • 4 comments

According to https://datatracker.ietf.org/doc/html/rfc6455#section-4.1, Page 18, the Connection header field MUST include the "Upgrade" token. But Beast uses a lower case "upgrade" token instead.

There are several occurrences., for example:

  • https://github.com/boostorg/beast/blob/710cc53331f197f6f17e8c38454c09df68e43c03/include/boost/beast/websocket/impl/stream_impl.hpp#L632
  • There are several occurrences. For example: https://github.com/boostorg/beast/blob/710cc53331f197f6f17e8c38454c09df68e43c03/include/boost/beast/websocket/impl/rfc6455.hpp#L29

harendt avatar Jun 16 '21 09:06 harendt

However: https://datatracker.ietf.org/doc/html/rfc2616#section-4.2

Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive.

madmongo1 avatar Jun 16 '21 10:06 madmongo1

The "Upgrade" token is a field value, not a field name. Don't know what that RFC says about case sensitivity of field values ...

harendt avatar Jun 16 '21 10:06 harendt

Don't know what that RFC says about case sensitivity of field values

They are case-insensitive unless otherwise specified.

https://datatracker.ietf.org/doc/html/rfc2616#section-2.1

vinniefalco avatar Jun 16 '21 15:06 vinniefalco

This issue has been open for a while with no activity, has it been resolved?

stale[bot] avatar Jan 09 '22 03:01 stale[bot]

Beast follows the standard here, so unless you've got a use-case that requires case-sensitivity, I'd like to close this issue.

klemens-morgenstern avatar Sep 24 '22 05:09 klemens-morgenstern