mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
added code as described in ticket 1307
This commit is contained in:
parent
c351a1d327
commit
005bcf5012
@ -387,6 +387,16 @@ class RenderMixin:
|
||||
raise server.UnsupportedMethod(getattr(self, 'allowedMethods', ()))
|
||||
return m(ctx)
|
||||
|
||||
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 ""
|
||||
|
||||
|
||||
class MultiFormatPage(Page):
|
||||
|
Loading…
Reference in New Issue
Block a user