@@ -58,7 +58,7 @@ func ObjectOidHandler(ctx *context.Context) {
58
58
}
59
59
60
60
if ctx .Req .Method == "GET" || ctx .Req .Method == "HEAD" {
61
- if MetaMatcher (ctx .Req ) {
61
+ if isValidAccept (ctx .Req ) {
62
62
getMetaHandler (ctx )
63
63
return
64
64
}
@@ -211,7 +211,7 @@ func PostHandler(ctx *context.Context) {
211
211
return
212
212
}
213
213
214
- if ! MetaMatcher (ctx .Req ) {
214
+ if ! isValidAccept (ctx .Req ) {
215
215
log .Info ("Attempt to POST without accepting the correct media type: %s" , lfs_module .MediaType )
216
216
writeStatus (ctx , http .StatusBadRequest )
217
217
return
@@ -281,7 +281,7 @@ func BatchHandler(ctx *context.Context) {
281
281
return
282
282
}
283
283
284
- if ! MetaMatcher (ctx .Req ) {
284
+ if ! isValidAccept (ctx .Req ) {
285
285
log .Info ("Attempt to BATCH without accepting the correct media type: %s" , lfs_module .MediaType )
286
286
writeStatus (ctx , http .StatusBadRequest )
287
287
return
@@ -402,7 +402,7 @@ func VerifyHandler(ctx *context.Context) {
402
402
return
403
403
}
404
404
405
- if ! MetaMatcher (ctx .Req ) {
405
+ if ! isValidAccept (ctx .Req ) {
406
406
log .Info ("Attempt to VERIFY without accepting the correct media type: %s" , lfs_module .MediaType )
407
407
writeStatus (ctx , http .StatusBadRequest )
408
408
return
@@ -473,9 +473,9 @@ func represent(rc *requestContext, pointer lfs_module.Pointer, download, upload
473
473
return rep
474
474
}
475
475
476
- // MetaMatcher provides a mux.MatcherFunc that only allows requests that contain
476
+ // isValidAccept provides a mux.MatcherFunc that only allows requests that contain
477
477
// an Accept header with the lfs_module.MediaType
478
- func MetaMatcher (r * http.Request ) bool {
478
+ func isValidAccept (r * http.Request ) bool {
479
479
mediaParts := strings .Split (r .Header .Get ("Accept" ), ";" )
480
480
mt := mediaParts [0 ]
481
481
return mt == lfs_module .MediaType
0 commit comments