From 71e140a32dfaa515e1ae204ec5cd0f84ccac7a51 Mon Sep 17 00:00:00 2001 From: cce Date: Sun, 1 Jan 2006 20:58:49 +0000 Subject: - fixed logic/definition problem /w multi-entry headers; __call__ now always returns a string value - renamed resolve to values in HTTPHeader to better reflect the public-interface for this (esp for multi-entry headers) - a few bugs in mult-entry headers - added common CGI headers to httpheaders; I know they don't really belong here, but error checking is nice - updated auth.digest and auth.basic to use httpheaders (this is what prompted the above changes) - added WWW_AUTHENTICATe header which will build a response to a digest challenge - fixed capitalization error in fileapp and added corresponding test --- paste/fileapp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'paste/fileapp.py') diff --git a/paste/fileapp.py b/paste/fileapp.py index 46cf49f..2fb5ae1 100644 --- a/paste/fileapp.py +++ b/paste/fileapp.py @@ -105,9 +105,9 @@ class DataApp(object): (lower,upper) = range[1][0] upper = upper or (self.content_length - 1) if upper >= self.content_length or lower > upper: - return HTTPRequestRANGENotSatisfiable(( - "RANGE request was made beyond the end of the content,\r\n" - "which is %s long.\r\n RANGE: %s\r\n") % ( + return HTTPRequestRangeNotSatisfiable(( + "Range request was made beyond the end of the content,\r\n" + "which is %s long.\r\n Range: %s\r\n") % ( self.content_length, RANGE(environ)) ).wsgi_application(environ, start_response) @@ -154,7 +154,7 @@ class FileApp(DataApp): self.last_modified = stat.st_mtime def __call__(self, environ, start_response): - if 'max-age=0' in CACHE_CONTROL(environ): + if 'max-age=0' in CACHE_CONTROL(environ).lower(): self.update(force=True) # RFC 2616 13.2.6 else: self.update() -- cgit v1.2.1