Skip to content

Commit

Permalink
fix content-type removal
Browse files Browse the repository at this point in the history
  • Loading branch information
reddec committed Jun 13, 2023
1 parent 0c95511 commit 8c1498a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/impl/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func (srv *Server) Set(ctx context.Context, req *api.SetReqWithContentType, para
if err != nil {
return err
}
contentType := req.ContentType
if contentType == "" {
contentType = "application/octet-stream"
}
var args = dbo.PutParams{
Namespace: params.Namespace,
Key: params.Key,
Expand Down Expand Up @@ -141,6 +145,5 @@ func (ctm *contentTypeMapper) setHeader() {
if ct == "" {
return
}
ctm.real.Header().Del("X-Content-Type")
ctm.real.Header().Set("Content-Type", ct)
}

0 comments on commit 8c1498a

Please sign in to comment.