MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / hasNonObjectQuery

Function hasNonObjectQuery

server/s3/redirect.go:145–156  ·  view source on GitHub ↗

hasNonObjectQuery reports whether the request carries a query parameter that makes gofakes3 route it to a sub-resource handler instead of plain object download (see gofakes3 routing.go). Only those keys force server-side handling; every other query parameter (response-content-disposition, response-c

(r *http.Request)

Source from the content-addressed store, hash-verified

143// response-content-type, etc.) is irrelevant to route selection and must not
144// block a direct redirect.
145func hasNonObjectQuery(r *http.Request) bool {
146 query := r.URL.Query()
147 for _, key := range []string{"uploadId", "uploads", "versioning", "versions", "location"} {
148 if _, ok := query[key]; ok {
149 return true
150 }
151 }
152 if versionID := query.Get("versionId"); versionID != "" && versionID != "null" {
153 return true
154 }
155 return false
156}
157
158func s3RequestAuthorized(r *http.Request, authPairs map[string]string) bool {
159 if len(authPairs) == 0 {

Callers 3

directObjectURLFunction · 0.85
directUploadURLFunction · 0.85
TestHasNonObjectQueryFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by 1

TestHasNonObjectQueryFunction · 0.68