File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ import (
2424 "strings"
2525)
2626
27- // reservedHeaders that change the connection, are set by Prometheus, or can
27+ // ReservedHeaders that change the connection, are set by Prometheus, or can
2828// be changed otherwise.
29- var reservedHeaders = map [string ]struct {}{
29+ var ReservedHeaders = map [string ]struct {}{
3030 "Authorization" : {},
3131 "Host" : {},
3232 "Content-Encoding" : {},
@@ -72,7 +72,7 @@ func (h *Headers) SetDirectory(dir string) {
7272// Validate validates the Headers config.
7373func (h * Headers ) Validate () error {
7474 for n := range h .Headers {
75- if _ , ok := reservedHeaders [http .CanonicalHeaderKey (n )]; ok {
75+ if _ , ok := ReservedHeaders [http .CanonicalHeaderKey (n )]; ok {
7676 return fmt .Errorf ("setting header %q is not allowed" , http .CanonicalHeaderKey (n ))
7777 }
7878 }
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ import (
2222)
2323
2424func TestReservedHeaders (t * testing.T ) {
25- for k := range reservedHeaders {
25+ for k := range ReservedHeaders {
2626 l := http .CanonicalHeaderKey (k )
2727 if k != l {
28- t .Errorf ("reservedHeaders keys should be lowercase: got %q, expected %q" , k , http .CanonicalHeaderKey (k ))
28+ t .Errorf ("ReservedHeaders keys should be lowercase: got %q, expected %q" , k , http .CanonicalHeaderKey (k ))
2929 }
3030 }
3131}
You can’t perform that action at this time.
0 commit comments