Use Header.Set() to override the existing header value (#1032)
Header.Add() appends string if there are same header key exists. Use Header.Set() to prevent this.
This commit is contained in:
@@ -482,7 +482,7 @@ func (fetcher *Fetcher) UploadHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
log.Println("Completed upload request")
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write(rBody)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user