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

Remove duplicate repo checks

parent 4836fff0
...@@ -17,11 +17,6 @@ import ( ...@@ -17,11 +17,6 @@ import (
) )
func handleGetArchive(w http.ResponseWriter, r *gitRequest, format string) { 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) archiveFilename := path.Base(r.ArchivePath)
if cachedArchive, err := os.Open(r.ArchivePath); err == nil { if cachedArchive, err := os.Open(r.ArchivePath); err == nil {
......
...@@ -13,11 +13,6 @@ import ( ...@@ -13,11 +13,6 @@ import (
) )
func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest, _ string) { 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") rpc := r.URL.Query().Get("service")
if !(rpc == "git-upload-pack" || rpc == "git-receive-pack") { if !(rpc == "git-upload-pack" || rpc == "git-receive-pack") {
// The 'dumb' Git HTTP protocol is not supported // The 'dumb' Git HTTP protocol is not supported
...@@ -62,11 +57,6 @@ func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest, _ string) { ...@@ -62,11 +57,6 @@ func handleGetInfoRefs(w http.ResponseWriter, r *gitRequest, _ string) {
} }
func handlePostRPC(w http.ResponseWriter, r *gitRequest, rpc 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 body io.ReadCloser
var err error 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