[tahoe-lafs-trac-stream] [tahoe-lafs] #1307: support HTTP OPTIONS requests

tahoe-lafs trac at tahoe-lafs.org
Mon Jul 8 17:58:22 UTC 2013


#1307: support HTTP OPTIONS requests
-------------------------+-------------------------------------------------
     Reporter:           |      Owner:  davidsarah
  davidsarah             |     Status:  assigned
         Type:  defect   |  Milestone:  1.11.0
     Priority:  normal   |    Version:  1.8.1
    Component:  code-    |   Keywords:  http standards options webdrive
  frontend-web           |  easy test-needed
   Resolution:           |
Launchpad Bug:           |
-------------------------+-------------------------------------------------
Changes (by daira):

 * keywords:  http standards options webdrive easy => http standards options
     webdrive easy test-needed
 * priority:  major => normal


Old 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 [source: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 ""
> }}}

New 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 [source: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 ""
 }}}

--

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1307#comment:4>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list