Skip to content

Commit

Permalink
server: add MethodHead to the /download mapping
Browse files Browse the repository at this point in the history
Closes #1278.
  • Loading branch information
fsouza committed Aug 4, 2023
1 parent 3ce006a commit 49bc72f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fakestorage/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (s *Server) buildMuxer() {

bucketHost := fmt.Sprintf("{bucketName}.%s", s.publicHost)
handler.Host(bucketHost).Path("/{objectName:.+}").Methods(http.MethodGet, http.MethodHead).HandlerFunc(s.downloadObject)
handler.Path("/download/storage/v1/b/{bucketName}/o/{objectName:.+}").Methods(http.MethodGet).HandlerFunc(s.downloadObject)
handler.Path("/download/storage/v1/b/{bucketName}/o/{objectName:.+}").Methods(http.MethodGet, http.MethodHead).HandlerFunc(s.downloadObject)
handler.Path("/upload/storage/v1/b/{bucketName}/o").Methods(http.MethodPost).HandlerFunc(jsonToHTTPHandler(s.insertObject))
handler.Path("/upload/storage/v1/b/{bucketName}/o/").Methods(http.MethodPost).HandlerFunc(jsonToHTTPHandler(s.insertObject))
handler.Path("/upload/storage/v1/b/{bucketName}/o").Methods(http.MethodPut).HandlerFunc(jsonToHTTPHandler(s.uploadFileContent))
Expand Down

0 comments on commit 49bc72f

Please sign in to comment.