mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
add the user-agent header
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user