mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-05 22:08:27 +00:00
Added '.xz' reader in HTTP download. This fixed issue when you try to mirror a distribution with only Packages.xz (example 'debian/experimental').
This commit is contained in:
committed by
Andrey Smirnov
parent
ce0001f94c
commit
db8595711b
@@ -3,6 +3,7 @@ package http
|
||||
import (
|
||||
"compress/bzip2"
|
||||
"compress/gzip"
|
||||
"github.com/smira/go-xz"
|
||||
"fmt"
|
||||
"github.com/mxk/go-flowrate/flowrate"
|
||||
"github.com/smira/aptly/aptly"
|
||||
@@ -322,6 +323,10 @@ var compressionMethods = []struct {
|
||||
extenstion: ".gz",
|
||||
transformation: func(r io.Reader) (io.Reader, error) { return gzip.NewReader(r) },
|
||||
},
|
||||
{
|
||||
extenstion: ".xz",
|
||||
transformation: func(r io.Reader) (io.Reader, error) { return xz.NewReader(r) },
|
||||
},
|
||||
{
|
||||
extenstion: "",
|
||||
transformation: func(r io.Reader) (io.Reader, error) { return r, nil },
|
||||
|
||||
Reference in New Issue
Block a user