summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-21 22:35:06 -0500
committerJeff Carr <[email protected]>2025-08-21 22:36:08 -0500
commita655c5a47e96a1274d6bab5a8d1b25b14c4f6649 (patch)
tree5c8d2fc6264587feaabd5973bc39718ccc7cce30 /http.go
parent1301c4476e3c39201e801ca1c25294d5abbf249a (diff)
fixing send patches
Diffstat (limited to 'http.go')
-rw-r--r--http.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/http.go b/http.go
index 93664f6..c9abaf7 100644
--- a/http.go
+++ b/http.go
@@ -21,13 +21,11 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
log.Info("ioutil.ReadAll() error =", err)
return
}
- // fmt.Fprintln(w, "ioutil.ReadAll() msg =", len(msg))
- // dumpClient(accessf, clientf, r)
+
var route string
- // tmp = r.URL.String()
route = cleanURL(r.URL.Path)
parts := strings.Split(route, "?")
- log.Info("client sent url =", route, parts)
+ // log.Info("client sent url =", route, parts)
requrl := parts[0]
if route == "/" {
@@ -47,7 +45,9 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
log.Warn("forged REQUEST URL =", requrl, "msg =", len(msg))
if route == "/patchset" {
- savePatchset(w, msg)
+ if err := savePatchset(w, msg); err != nil {
+ log.Warn("forged /patchset error", err)
+ }
return
}
@@ -124,7 +124,7 @@ func writeFile(w http.ResponseWriter, filename string) {
var repohtml string
repohtml = string(pfile)
fmt.Fprintln(w, repohtml)
- log.Println("writeFile() found internal file:", filename)
+ // log.Println("writeFile() found internal file:", filename)
}
func badurl(w http.ResponseWriter, badurl string) {