Open krhubert opened 3 years ago
go version
$ go version go version go1.16.4 linux/amd64
yes
go env
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOENV="/home/user/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/user/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/user" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/user/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/user/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.16" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/user/src/golang/go/src/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4138403793=/tmp/go-build -gno-record-gcc-switches"
https://play.golang.org/p/yEHPZvGjTbN
Based on rfc2616 section 19.5.1 (https://datatracker.ietf.org/doc/html/rfc2616#section-19.5.1):
content-disposition = "Content-Disposition" ":" disposition-type *( ";" disposition-parm ) disposition-type = "attachment" | disp-extension-token disposition-parm = filename-parm | disp-extension-parm filename-parm = "filename" "=" quoted-string disp-extension-token = token disp-extension-parm = token "=" ( token | quoted-string ) An example is Content-Disposition: attachment; filename="fname.ext"
https://datatracker.ietf.org/doc/html/rfc2616#section-19.5.1
attachment; filename="file.txt"
attachment; filename=file.txt
CC @bradfitz via owners.
Issue #43128 may be related.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/yEHPZvGjTbN
Based on rfc2616 section 19.5.1 (https://datatracker.ietf.org/doc/html/rfc2616#section-19.5.1):
https://datatracker.ietf.org/doc/html/rfc2616#section-19.5.1
What did you expect to see?
What did you see instead?