w3c / webmention

Webmention spec
https://www.w3.org/TR/webmention/
112 stars 46 forks source link

how should webmention servers redirect to a new URL #90

Open aaronpk opened 7 years ago

aaronpk commented 7 years ago

for example if a webmention server sends a redirect from http to https, but pages are still advertising the http endpoint, how can the server tell webmention senders to re-try at a new URL?

Related: #89

sandhawke commented 7 years ago

Redirect seems good to me, but I'm a little fuzzy on reality vs the specs, as far as which code to suggest. See, for example, https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308

aaronpk commented 7 years ago

My understanding was that HTTP 307/308 are the proper response codes to use in this case, since HTTP 301/302 got re-purposed because of browsers.

From that linked page,

The request method and the body will not be altered, whereas 301 may incorrectly sometimes be changed to a GET method.

Essentially what's happened is 301/302 has turned into a convenient way for the result of a form post to redirect the browser to the resource that was created, so it's no longer an appropriate code to use to tell a client to re-send a POST to a new URL, hence the need for 307/308.