Skip to content

Commit 45dbc8f

Browse files
authored
Fix an obscure error in HTTP protocol with LZ4 compression (#1230)
1 parent 4c8219e commit 45dbc8f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

conn_http.go

+3
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ func (h *httpConnect) readRawResponse(response *http.Response) (body []byte, err
425425
if err != nil {
426426
return nil, err
427427
}
428+
if response.StatusCode == http.StatusForbidden {
429+
return nil, errors.New(string(body))
430+
}
428431
if h.compression == CompressionLZ4 || h.compression == CompressionZSTD {
429432
chReader := chproto.NewReader(reader)
430433
chReader.EnableCompression()

0 commit comments

Comments
 (0)