Commit 06e27806 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Return 403 if no service is found

TODO: add a test for this
parent baf89b43
......@@ -114,7 +114,9 @@ func gitHandler(w http.ResponseWriter, r *http.Request) {
}
}
if !foundService {
http.Error(w, "Not Found", 404)
// The protocol spec in git/Documentation/technical/http-protocol.txt
// says we must return 403 if no matching service is found.
http.Error(w, "Forbidden", 403)
return
}
......
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