Skip to content

Commit

Permalink
Fix an obscure error in HTTP protocol with LZ4 compression (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
YenchangChan authored Mar 11, 2024
1 parent 4c8219e commit 45dbc8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conn_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ func (h *httpConnect) readRawResponse(response *http.Response) (body []byte, err
if err != nil {
return nil, err
}
if response.StatusCode == http.StatusForbidden {
return nil, errors.New(string(body))
}
if h.compression == CompressionLZ4 || h.compression == CompressionZSTD {
chReader := chproto.NewReader(reader)
chReader.EnableCompression()
Expand Down

0 comments on commit 45dbc8f

Please sign in to comment.