Fix Content-Disposition parsing when the filename isn't quoted
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
bb1227eadb
commit
b758eb39f0
|
@ -227,7 +227,7 @@ func extractFile(r io.Reader, format archiver.Format, name string, opts Options)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var cdHeaderRgx = regexp.MustCompile(`filename="(.+)"`)
|
var cdHeaderRgx = regexp.MustCompile(`filename="?(.+)"?`)
|
||||||
|
|
||||||
// getFilename attempts to parse the Content-Disposition
|
// getFilename attempts to parse the Content-Disposition
|
||||||
// HTTP response header and extract a filename. If the
|
// HTTP response header and extract a filename. If the
|
||||||
|
|
Loading…
Reference in New Issue