mirror of https://github.com/linkerd/linkerd2.git
* Fix service profiles quoted filename download issue (#2473) * Change the tests accordingly to fix quotes in filename Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
This commit is contained in:
parent
e5d2460792
commit
e9287cc8c8
|
@ -76,7 +76,7 @@ func (h *handler) handleProfileDownload(w http.ResponseWriter, req *http.Request
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dispositionHeaderVal := fmt.Sprintf("attachment; filename='%s-profile.yml'", service)
|
dispositionHeaderVal := fmt.Sprintf("attachment; filename=%s-profile.yml", service)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "text/yaml")
|
w.Header().Set("Content-Type", "text/yaml")
|
||||||
w.Header().Set("Content-Disposition", dispositionHeaderVal)
|
w.Header().Set("Content-Disposition", dispositionHeaderVal)
|
||||||
|
|
|
@ -95,7 +95,7 @@ func TestHandleConfigDownload(t *testing.T) {
|
||||||
"text/yaml",
|
"text/yaml",
|
||||||
},
|
},
|
||||||
"Content-Disposition": []string{
|
"Content-Disposition": []string{
|
||||||
"attachment; filename='authors-profile.yml'",
|
"attachment; filename=authors-profile.yml",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(recorder.Header(), header) {
|
if !reflect.DeepEqual(recorder.Header(), header) {
|
||||||
|
|
Loading…
Reference in New Issue