2 Commits

Author SHA1 Message Date
idk
d4e8455e95 git compatibility read only 2019-10-14 00:47:59 -04:00
idk
071895b67e git compatibility read only 2019-10-14 00:44:16 -04:00
2 changed files with 6 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ echo:
USER_GH=eyedeekay
packagename=eephttpd
VERSION=0.0.9
VERSION=0.0.93
tag:
gothub release -s $(GITHUB_TOKEN) -u $(USER_GH) -r $(packagename) -t v$(VERSION) -d "I2P Tunnel Management tool for Go applications"

View File

@@ -14,8 +14,12 @@ import (
func (f *EepHttpd) ServeHTTP(rw http.ResponseWriter, rq *http.Request) {
rp := f.checkURL(rq)
for k, f := range rq.Header {
log.Println(k,"=", f)
}
if strings.HasPrefix(rq.Header.Get("X-User-Agent"), "git") {
f.HandleGit(rw, rq)
return
}
if strings.HasSuffix(rp, ".md") {
f.HandleMarkdown(rw, rq)
@@ -88,6 +92,7 @@ func (f *EepHttpd) HandleMarkdown(rw http.ResponseWriter, rq *http.Request) {
}
func (f *EepHttpd) HandleGit(rw http.ResponseWriter, rq *http.Request) {
log.Println("Handling Git")
f.Server.ServeHTTP(rw, rq)
}