kubo
kubo copied to clipboard
Support the HTTP OPTIONS method on the gateway
Checklist
- [X] My issue is specific & actionable.
- [X] I am not suggesting a protocol enhancement.
- [X] I have searched on the issue tracker for my issue.
Description
For reference about what this method is, see [1]
curl -X OPTIONS <gateway> -i should report the allowed HTTP methods.
Having this doesn't seem to be required and websites seem to work just fine without.
Same for regular gateway purposes as we know it now.
However... We're at the very least going to attempt to build WebDAV support in the gateway. For WebDAV this HTTP method is required [2]. If we need it anyway, we might as well add proper support while at it. Proper meaning:
- A options call to
should advertise the usable options. - If an invalid method is called we should respond with
405[3]. Currently any invalid call is a404error (page not found)
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS [2] http://www.webdav.org/specs/rfc4918.html#HEADER_DAV [3] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Allow
Could this be done with a plugin?
Hi @markg85 , what do you mean when you say "gateway"? Can you give an example in the command "curl -X OPTIONS <gateway> -i"?
Ah, this issue still exists and is still open. Closed :)
@patrickReiis, Ipfs - kubo specifically - starts a gateway. The http endpoint to access ipfs. That thing is what i mean with <gateway>. so like https://ipfs.io and https://dweb.link are some examples.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS for what the OPTIONS method should return. The IPFS gateway (the http server behind the scenes) doesn't give he output you should get.
This was for the webdav experiment. Which has been run and is open for discussion. As it stands, it doesn't look like webdav is going to be supported (support for the OPTIONS http-method would be a requirement there). So closing this as it's just not a point anymore.
Oh I see, thanks for replying. Now I'll look for another issue, hehe.