w3c / websub

WebSub Spec in Social Web Working Group

Home Page:https://w3c.github.io/websub/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify that Content-Type MUST or SHOULD be included in (un)subscription requests

tonyg opened this issue · comments

In the 20 Oct draft, I see "This request has a Content-Type of application/x-www-form-urlencoded". I had overlooked this when building my implementation, which led to failures in interop testing with pubsub.rocks.

In fact, my first reading of the sentence in the spec is that it tells me how to format the body, but doesn't directly tell me anything about whether or which Content-Type header I should or must include. Perhaps strengthening this to a SHOULD or a MUST would help.

Concretely, I suggest revising the opening lines of the "Subscriber Sends Subscription Request" section to be:

Subscription is initiated by the subscriber making an HTTPS or HTTP POST [[!RFC7231]] request to the hub URL. This request MUST have a Content-Type header of application/x-www-form-urlencoded (described in Section 17.13.4 of [[!W3C.REC-html401-19991224]]) and the following parameters in its body, formatted accordingly:

Do you mind submitting a PR? This makes it easier to see changes? Thanks!