Opened 7 years ago

Closed 6 years ago

#442 closed design (fixed)

BWS

Reported by: mnot@… Owned by: draft-ietf-httpbis-p1-messaging@…
Priority: normal Milestone: 23
Component: p1-messaging Severity: In WG Last Call
Keywords: Cc:

Description

p1 3.2.3 says:

BWS is used where the grammar allows optional whitespace, for historical reasons, but senders SHOULD NOT generate it in messages; recipients MUST accept such bad optional whitespace and remove it before interpreting the field value or forwarding the message downstream.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-22#section-3.2.3

Throughout our specs, BWS is used at the end of header fields:

header-field = field-name ":" OWS field-value BWS

and in transfer-codings:

transfer-parameter = attribute BWS "=" BWS value

and in Expect headers:

expectation = expect-name [ BWS "=" BWS expect-value]

*( OWS ";" [ OWS expect-param ] )

expect-param = expect-name [ BWS "=" BWS expect-value ]

and, finally, in auth-params on challenges and credentials:

auth-param = token BWS "=" BWS ( token / quoted-string )

Is this whitespace really "bad" enough to MUST-require that intermediaries (including load balancers and other hardware!) remove it before forwarding the message?

Attachments (1)

442.diff (1.0 KB) - added by julian.reschke@… 7 years ago.
Proposed patch

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by julian.reschke@…

Proposed patch

comment:1 Changed 7 years ago by mnot@…

  • Milestone changed from unassigned to 23

Also in p2, add (regarding media type parameters):

Note that unlike some similar constructs in other headers, media type parameters do not allow whitespace (even "bad" whitespace) around the "=" character.

comment:2 Changed 7 years ago by julian.reschke@…

From [2225]:

adjust BWS requirements (see #442)

comment:3 Changed 7 years ago by julian.reschke@…

  • Resolution set to incorporated
  • Status changed from new to closed

comment:4 follow-up: Changed 7 years ago by mnot@…

  • Resolution incorporated deleted
  • Status changed from closed to reopened

p2 as well, please...

comment:5 in reply to: ↑ 4 Changed 7 years ago by julian.reschke@…

Replying to mnot@…:

p2 as well, please...

You mean [2223]?

comment:6 Changed 7 years ago by julian.reschke@…

  • Resolution set to incorporated
  • Status changed from reopened to closed

comment:7 Changed 6 years ago by fielding@…

  • Resolution incorporated deleted
  • Status changed from closed to reopened

Note that I changed this wording slightly in [2253].

Also, I am reopening this issue because the use of BWS for trailing whitespace is inconsistent with the other uses of BWS. Trailing whitespace isn't bad — it's just wasteful — and calling it bad is a problem with our other suggestion for replacing sequences of whitespace (obs-fold and HTAB) with sequences of SP for in-place message filtering. The existing SHOULD in OWS seems to be more appropriate. I can't remember why I made it BWS here.

comment:8 Changed 6 years ago by mnot@…

+1

comment:9 Changed 6 years ago by fielding@…

From [2263]:

Change header field trailing whitespace from BWS to OWS to be consistent with suggested in-place white-out; demote an untargeted requirement on removing leading and trailing whitespace to a suggestion on parser handling of field-value to be consistent with the ABNF; addresses #442

comment:10 Changed 6 years ago by fielding@…

  • Resolution set to incorporated
  • Status changed from reopened to closed

comment:11 Changed 6 years ago by mnot@…

  • Resolution incorporated deleted
  • Status changed from closed to reopened

comment:12 Changed 6 years ago by mnot@…

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.