Add application/json Content-Type header

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
Evgeniy Kulikov 2021-01-26 11:43:40 +03:00
parent 0346db462b
commit ace31ceefd
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2

View file

@ -21,6 +21,8 @@ type putResponse struct {
CID string `json:"container_id"` CID string `json:"container_id"`
} }
const jsonHeader = "application/json; charset=UTF-8"
func newPutResponse(addr *object.Address) *putResponse { func newPutResponse(addr *object.Address) *putResponse {
return &putResponse{ return &putResponse{
OID: addr.ObjectID().String(), OID: addr.ObjectID().String(),
@ -149,4 +151,5 @@ func (a *app) upload(c *fasthttp.RequestCtx) {
} }
c.Response.SetStatusCode(fasthttp.StatusOK) c.Response.SetStatusCode(fasthttp.StatusOK)
c.Response.Header.SetContentType(jsonHeader)
} }