add the user-agent header

This commit is contained in:
“DarthSett”
2019-10-23 16:35:57 +05:30
parent 0000173c05
commit 7adc70c5a5
2 changed files with 2 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ func dummyServer(t *testing.T, expectedToken, expectedID string, expectedVersion
t.Errorf("want %q, have %q", expectedID, have)
}
if have := r.Header.Get("user-agent"); "Scope/1.11.6" != have {
if have := r.Header.Get("user-agent"); have != "Scope/1.11.6" {
t.Errorf("want %q, have %q", app.Version, have)
}
var have report.Report

View File

@@ -46,7 +46,7 @@ func (pc ProbeConfig) authorizeHeaders(headers http.Header) {
}
headers.Set(xfer.ScopeProbeIDHeader, pc.ProbeID)
headers.Set(xfer.ScopeProbeVersionHeader, pc.ProbeVersion)
headers.Set("user-agent","Scope/1.11.6")
headers.Set("user-agent","Scope/1.11.6" )
}
func (pc ProbeConfig) authorizedRequest(method string, urlStr string, body io.Reader) (*http.Request, error) {