HEAD requests to file result in 405 #314

Closed
opened 2026-01-19 18:29:51 +00:00 by michael · 0 comments
Owner

Originally created by @limitedeternity on GitHub.

Because /server/server.go has no defined handlers for this method. Only GET method allowed:

r.HandleFunc("/{token}/{filename}", getHandlerFn).Methods("GET")
r.HandleFunc("/get/{token}/{filename}", getHandlerFn).Methods("GET")
r.HandleFunc("/download/{token}/{filename}", getHandlerFn).Methods("GET")

Otherwise, I see no way to check if file actually exists without GETting it.

Originally created by @limitedeternity on GitHub. Because `/server/server.go` has no defined handlers for this method. Only GET method allowed: ```go r.HandleFunc("/{token}/{filename}", getHandlerFn).Methods("GET") r.HandleFunc("/get/{token}/{filename}", getHandlerFn).Methods("GET") r.HandleFunc("/download/{token}/{filename}", getHandlerFn).Methods("GET") ``` Otherwise, I see no way to check if file actually exists without GETting it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#314