forked from seba/servefile
Added server version to HTTP headers
This commit is contained in:
parent
5e62b1783e
commit
4567570962
|
@ -40,6 +40,7 @@ def getDateStrNow():
|
||||||
class FileBaseHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
class FileBaseHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
fileName = "Undefined"
|
fileName = "Undefined"
|
||||||
blockSize = 1024 * 1024
|
blockSize = 1024 * 1024
|
||||||
|
server_version = "servefile/" + __version__
|
||||||
|
|
||||||
def checkAndDoRedirect(self):
|
def checkAndDoRedirect(self):
|
||||||
""" If request didn't request self.fileName redirect to self.fileName.
|
""" If request didn't request self.fileName redirect to self.fileName.
|
||||||
|
@ -126,6 +127,7 @@ class TarFileHandler(FileBaseHandler):
|
||||||
target = None
|
target = None
|
||||||
compression = "none"
|
compression = "none"
|
||||||
compressionMethods = ("none", "gzip", "bzip2")
|
compressionMethods = ("none", "gzip", "bzip2")
|
||||||
|
server_version = "servefile/" + __version__
|
||||||
|
|
||||||
def do_HEAD(self):
|
def do_HEAD(self):
|
||||||
if self.checkAndDoRedirect():
|
if self.checkAndDoRedirect():
|
||||||
|
|
Loading…
Reference in New Issue