fix content-type detection

This commit is contained in:
Evgeniy Kulikov 2020-02-29 16:40:54 +03:00
parent 758006dea0
commit 131d99a182
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2

View file

@ -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