File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -351,13 +351,13 @@ func decodeOpts(opts map[string][]string) map[string][]string {
351
351
md := make (map [string ][]string , len (opts ))
352
352
for k , v := range opts {
353
353
out := make ([]string , len (v ))
354
- var isDecoded bool
354
+ var isEncoded bool
355
355
if v , ok := opts [k + "-encoded" ]; ok && len (v ) > 0 {
356
356
if b , _ := strconv .ParseBool (v [0 ]); b {
357
- isDecoded = true
357
+ isEncoded = true
358
358
}
359
359
}
360
- if isDecoded {
360
+ if isEncoded {
361
361
for i , s := range v {
362
362
out [i ], _ = url .QueryUnescape (s )
363
363
}
@@ -373,13 +373,14 @@ func decodeOpts(opts map[string][]string) map[string][]string {
373
373
// is backwards compatible and avoids encoding ASCII characters.
374
374
func encodeStringForHeader (inputs []string ) ([]string , bool ) {
375
375
var encode bool
376
+ loop:
376
377
for _ , input := range inputs {
377
378
for _ , runeVal := range input {
378
379
// Only encode non-ASCII characters, and characters that have special
379
380
// meaning during decoding.
380
381
if runeVal > unicode .MaxASCII {
381
382
encode = true
382
- break
383
+ break loop
383
384
}
384
385
}
385
386
}
You can’t perform that action at this time.
0 commit comments