Closed odesenfans closed 11 months ago
From the spec:
The server must generate an Allow header field in a 405 status code response. The field must contain a list of methods that the target resource currently supports.
Is this the case on pyaleph @odesenfans ?
Source: https://developer.mozilla.org/en-US/docs/web/http/status/405
@hoh yes, this is managed by aiohttp:
curl -i -X POST api2.aleph.im/
HTTP/1.1 405 Method Not Allowed
Server: nginx/1.17.6
Date: Mon, 18 Sep 2023 16:35:24 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 23
Connection: keep-alive
Allow: GET,HEAD,OPTIONS
Problem: a user reports that publishing a message falls because of a 405 error returned from
POST /messages
. The fallback only takes 404 into account, but a 405 is actually more likely becauseGET /messages
exists.Solution: accept both 404 and 405 as a sign that the node does not support
POST /messages
.