forked from TrueCloudLab/frostfs-http-gw
Add application/json
Content-Type header
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
parent
0346db462b
commit
ace31ceefd
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue