mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-26 20:19:11 +08:00
1. pass through http response headers
2. set http status 201 for creating files
This commit is contained in:
parent
a3fb644d86
commit
5d88cec2df
@ -100,6 +100,9 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
for k, v := range resp.Header {
|
||||
w.Header()[k] = v
|
||||
}
|
||||
io.Copy(w, resp.Body)
|
||||
}
|
||||
|
||||
@ -169,6 +172,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) {
|
||||
writeJsonError(w, r, db_err)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
}
|
||||
|
||||
// curl -X DELETE http://localhost:8888/path/to
|
||||
|
Loading…
Reference in New Issue
Block a user