Fix header canonicalization (#435)
This commit is contained in:
parent
d6b273332b
commit
aaa8f31865
@ -3,6 +3,7 @@
|
|||||||
- New
|
- New
|
||||||
- Changed
|
- Changed
|
||||||
- Fixed the way the "size" is calculated, it should match content-length now
|
- Fixed the way the "size" is calculated, it should match content-length now
|
||||||
|
- Fixed an issue with header canonicalization when a keyword was just a part of the header name
|
||||||
- Fixed output writing so it doesn't silently fail if it needs to create directories recursively
|
- Fixed output writing so it doesn't silently fail if it needs to create directories recursively
|
||||||
|
|
||||||
- v1.3.0
|
- v1.3.0
|
||||||
|
|||||||
@ -255,14 +255,14 @@ func ConfigFromOptions(parseOpts *ConfigOptions, ctx context.Context, cancel con
|
|||||||
// except if used in custom defined header
|
// except if used in custom defined header
|
||||||
var CanonicalNeeded = true
|
var CanonicalNeeded = true
|
||||||
for _, a := range conf.CommandKeywords {
|
for _, a := range conf.CommandKeywords {
|
||||||
if a == hs[0] {
|
if strings.Contains(hs[0], a) {
|
||||||
CanonicalNeeded = false
|
CanonicalNeeded = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check if part of InputProviders
|
// check if part of InputProviders
|
||||||
if CanonicalNeeded {
|
if CanonicalNeeded {
|
||||||
for _, b := range conf.InputProviders {
|
for _, b := range conf.InputProviders {
|
||||||
if b.Keyword == hs[0] {
|
if strings.Contains(hs[0], b.Keyword) {
|
||||||
CanonicalNeeded = false
|
CanonicalNeeded = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user