Commit 0df33b1d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Remove duplicate repo checks

parent 4836fff0
......@@ -17,11 +17,6 @@ import (
)
func handleGetArchive(w http.ResponseWriter, r *gitRequest, format string) {
if !looksLikeRepo(r.RepoPath) {
http.Error(w, "Not Found", 404)
return
}
archiveFilename := path.Base(r.ArchivePath)
if cachedArchive, err := os.Open(r.ArchivePath); err == nil {
......
......@@ -13,11 +13,6 @@ import (
)
func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest, _ string) {
if !looksLikeRepo(r.RepoPath) {
http.Error(w, "Not Found", 404)
return
}
rpc := r.URL.Query().Get("service")
if !(rpc == "git-upload-pack" || rpc == "git-receive-pack") {
// The 'dumb' Git HTTP protocol is not supported
......@@ -62,11 +57,6 @@ func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest, _ string) {
}
func handlePostRPC(w http.ResponseWriter, r *gitRequest, rpc string) {
if !looksLikeRepo(r.RepoPath) {
http.Error(w, "Not Found", 404)
return
}
var body io.ReadCloser
var err error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment