Skip to content

Commit

Permalink
Adds a new HTTP_Response class for X-Sendfile replies.
Browse files Browse the repository at this point in the history
git-svn-id: svn://cherokee-project.com/CTK/trunk@4155 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Jan 22, 2010
1 parent c7a35bd commit be9bf2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CTK/HTTP.py
Expand Up @@ -110,3 +110,8 @@ class HTTP_Redir (HTTP_Response):
def __init__ (self, location, error=307):
HTTP_Response.__init__ (self, error)
self['Location'] = location

class HTTP_XSendfile (HTTP_Response):
def __init__ (self, location, error=200):
HTTP_Response.__init__ (self, error)
self['X-Sendfile'] = location
2 changes: 1 addition & 1 deletion CTK/__init__.py
Expand Up @@ -39,6 +39,6 @@
from iPhoneToggle import iPhoneToggle
from Tab import Tab
from Dialog import Dialog
from HTTP import HTTP_Redir, HTTP_Error
from HTTP import HTTP_Redir, HTTP_Error, HTTP_XSendfile
from HiddenField import HiddenField
from Uploader import Uploader

0 comments on commit be9bf2a

Please sign in to comment.