Compare commits
3 Commits
a0b8ae4932
...
30738981f4
Author | SHA1 | Date |
---|---|---|
Sebastian Lohff | 30738981f4 | |
Sebastian Lohff | 53d803626d | |
bitwave | aeb8588198 |
|
@ -227,7 +227,7 @@ class FileHandler(FileBaseHandler):
|
||||||
class TarFileHandler(FileBaseHandler):
|
class TarFileHandler(FileBaseHandler):
|
||||||
target = None
|
target = None
|
||||||
compression = "none"
|
compression = "none"
|
||||||
compressionMethods = ("none", "gzip", "bzip2")
|
compressionMethods = ("none", "gzip", "bzip2", "xz")
|
||||||
|
|
||||||
def do_HEAD(self):
|
def do_HEAD(self):
|
||||||
if self.checkAndDoRedirect():
|
if self.checkAndDoRedirect():
|
||||||
|
@ -269,6 +269,8 @@ class TarFileHandler(FileBaseHandler):
|
||||||
cmd = ["tar", "-cz"]
|
cmd = ["tar", "-cz"]
|
||||||
elif self.compression == "bzip2":
|
elif self.compression == "bzip2":
|
||||||
cmd = ["tar", "-cj"]
|
cmd = ["tar", "-cj"]
|
||||||
|
elif self.compression == "xz":
|
||||||
|
cmd = ["tar", "-cJ"]
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unknown compression mode '%s'." % self.compression)
|
raise ValueError("Unknown compression mode '%s'." % self.compression)
|
||||||
|
|
||||||
|
@ -287,6 +289,8 @@ class TarFileHandler(FileBaseHandler):
|
||||||
return ".tar.gz"
|
return ".tar.gz"
|
||||||
elif TarFileHandler.compression == "bzip2":
|
elif TarFileHandler.compression == "bzip2":
|
||||||
return ".tar.bz2"
|
return ".tar.bz2"
|
||||||
|
elif TarFileHandler.compression == "xz":
|
||||||
|
return ".tar.xz"
|
||||||
raise ValueError("Unknown compression mode '%s'." % TarFileHandler.compression)
|
raise ValueError("Unknown compression mode '%s'." % TarFileHandler.compression)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ available.
|
||||||
.TP
|
.TP
|
||||||
\fB\-c\fR method, \fB\-\-compression\fR method
|
\fB\-c\fR method, \fB\-\-compression\fR method
|
||||||
Set compression method, only in combination with
|
Set compression method, only in combination with
|
||||||
\fB\-\-tar\fR. Can be one of none, gzip, bzip2.
|
\fB\-\-tar\fR. Can be one of none, gzip, bzip2, xz.
|
||||||
.TP
|
.TP
|
||||||
\fB\-4\fR, \fB\-\-ipv4\-only\fR
|
\fB\-4\fR, \fB\-\-ipv4\-only\fR
|
||||||
Listen on IPv4 only
|
Listen on IPv4 only
|
||||||
|
|
Loading…
Reference in New Issue