What version of Go are you using (go version)?
go version go1.9.4 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/projects/go"
GORACE=""
GOROOT="/usr/lib/go-1.9"
GOTOOLDIR="/usr/lib/go-1.9/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build449725707=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
I want to use ReadMIMEHeader() from net/textproto/reader.go for reading headers on ICAP protocol. So I have a trouble with key := canonicalMIMEHeaderKey(kv[:endKey]) (line: 496), because ICAP protocol have a case sensitive headers (for ex: ISTag). Please can you add a new flag-variable to ReadMIMEHeader function for skip canonicalMIMEHeaderKey conversion.
What did you expect to see?
Something like this:
func (r *Reader) ReadMIMEHeader(toCanonical bool) (MIMEHeader, error)
and
if toCanonical == true { key := canonicalMIMEHeaderKey(kv[:endKey]) }
What did you see instead?
func (r *Reader) ReadMIMEHeader() (MIMEHeader, error)
and
key := canonicalMIMEHeaderKey(kv[:endKey])
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 envOutputWhat did you do?
I want to use ReadMIMEHeader() from net/textproto/reader.go for reading headers on ICAP protocol. So I have a trouble with
key := canonicalMIMEHeaderKey(kv[:endKey])(line: 496), because ICAP protocol have a case sensitive headers (for ex: ISTag). Please can you add a new flag-variable to ReadMIMEHeader function for skipcanonicalMIMEHeaderKeyconversion.What did you expect to see?
Something like this:
func (r *Reader) ReadMIMEHeader(toCanonical bool) (MIMEHeader, error)and
if toCanonical == true { key := canonicalMIMEHeaderKey(kv[:endKey]) }What did you see instead?
func (r *Reader) ReadMIMEHeader() (MIMEHeader, error)and
key := canonicalMIMEHeaderKey(kv[:endKey])