diff --git a/binary_transparency/firmware/internal/client/client.go b/binary_transparency/firmware/internal/client/client.go index f904cbb25..40964b90e 100644 --- a/binary_transparency/firmware/internal/client/client.go +++ b/binary_transparency/firmware/internal/client/client.go @@ -96,6 +96,9 @@ func (c SubmitClient) PublishFirmware(manifest, image []byte) error { if err != nil { return fmt.Errorf("failed to publish to log endpoint (%s): %w", u, err) } + if resp.Request.Method != "POST" { + return fmt.Errorf("POST request to %q was converted to %s request to %q", u.String(), resp.Request.Method, resp.Request.URL) + } if r.StatusCode != http.StatusOK { return errFromResponse("failed to submit to log", r) }