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

Subscription request needs to define UTF-8 [I18N]

aphillips opened this issue · comments

(https://w3c.github.io/websub/#subscriber-sends-subscription-request)

In section 5.1, the subscription request is defined:

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:

URL Encoded does not define the character encoding used. Normally, the encoding is inferred from the sending page/URL. The specification should define the encoding explicitly to always be UTF-8.

from (w3c/i18n-activity/issues/324)

Good point and fixed! Thanks.

Can you add a reference to the pull request? Also, I notice that your editor's copy in github is broken (as of 2017-03-14)

oups. you are right. that commit was lost :/ Adding a new one with an explicit PR.

@aphillips Does the commit above address the problem? What's not clear to me is whether the header value itself needs to be application/x-www-form-urlencoded; UTF-8, or if it's enough for the spec to say that the payload must always use UTF-8.

The header value cannot take a charset: this is why the comment is necessary. Implementers need to know that form-urlencoded does not by itself imply a character encoding and that one must be imposed. Thus the spec needs to say that the payload must always use UTF-8. I added a comment to the pull request with suggestions (use HTML5 instead of 4 and some wording tweaks).

Thanks @aphillips! Please close the issue if this addresses it.

I am satisfied by b52ad9b. Thanks!