summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorforge <[email protected]>2025-10-31 00:05:42 -0500
committerJeff Carr <[email protected]>2025-10-31 00:09:09 -0500
commit5bb2ce2fca59fa5672d9fdaa7855e8d5b0802512 (patch)
tree2dca40822ae2607e2b6488b6c95c184e6df45011 /http.go
parenta07376f5593a0ec98a60b8d8bce0a8489eff3a37 (diff)
fix patchset initHEADv0.0.71masterdevel
Diffstat (limited to 'http.go')
-rw-r--r--http.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/http.go b/http.go
index 436d118..bc253c2 100644
--- a/http.go
+++ b/http.go
@@ -1,6 +1,7 @@
package main
import (
+ "errors"
"fmt"
"net/http"
"strings"
@@ -21,6 +22,7 @@ func logReqPB(pb *httppb.HttpRequest) {
}
func okHandler(w http.ResponseWriter, r *http.Request) {
+ log.Info("GOT TO okHandler()")
reqPB, err := httppb.ReqToPB(r)
reqPB.Logf("START: Got %d bytes from the client", len(reqPB.ClientData))
if err != nil {
@@ -78,6 +80,9 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
result := new(forgepb.Set)
switch route {
case "/set/new":
+ if me.Patchsets == nil {
+ argvpb.BadExit("patchsets == nil", errors.New("patchsets == nil"))
+ }
me.Patchsets.Append(pb)
reqPB.Logf("addNewPatches() pb.Patches.Len()=%d Patchsets.Len()=%d", pb.Patches.Len(), me.Patchsets.Len())
me.forge.SavePatchsets()