fix content-type detection
This commit is contained in:
parent
758006dea0
commit
131d99a182
1 changed files with 3 additions and 1 deletions
|
@ -138,7 +138,9 @@ func receiveObject(c *fasthttp.RequestCtx, cli object.Service_GetClient) error {
|
|||
}
|
||||
}
|
||||
|
||||
typ = http.DetectContentType(obj.Payload)
|
||||
if len(obj.Payload) > 0 {
|
||||
typ = http.DetectContentType(obj.Payload)
|
||||
}
|
||||
|
||||
if _, err = c.Write(obj.Payload); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue