net/textproto: ability to skip conversion for canonical format #29965
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
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?
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 skipcanonicalMIMEHeaderKey
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])
The text was updated successfully, but these errors were encountered: