Opened at 2011-01-14T05:53:59Z
Last modified at 2018-01-05T00:50:54Z
#1307 closed defect
support HTTP OPTIONS requests — at Initial Version
Reported by: | davidsarah | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | soon |
Component: | code-frontend-web | Version: | 1.8.1 |
Keywords: | http standards options webdrive easy test-needed | Cc: | |
Launchpad Bug: |
Description
secorp was testing the JavaScript webdrive code, and found that it was failing due to lack of support for OPTIONS requests. Here's some code to add to RenderMixin in src/allmydata/web/common.py to support OPTIONS:
def render_OPTIONS(self, ctx) from allmydata import __version__ req = IRequest(ctx) req.setHeader("server", "Tahoe-LAFS gateway v" + __version__) methods = ', '.join([m[7:] for m in dir(self) if m.startswith('render_')]) req.setHeader("allow", methods) req.setHeader("public", methods) req.setHeader("compliance", "rfc=2068, rfc=2616") req.setHeader("content-length", 0) return ""
Note: See
TracTickets for help on using
tickets.