1
0
mirror of synced 2024-11-22 04:56:06 +03:00

increase size limit for MG response

This commit is contained in:
Pavel 2023-05-03 10:48:46 +03:00 committed by GitHub
commit f9ebf631ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,11 +8,12 @@ import (
)
const MB = 1 << 20
const LimitResponse = 3 * MB
func buildLimitedRawResponse(resp *http.Response) ([]byte, error) {
defer resp.Body.Close()
limitReader := io.LimitReader(resp.Body, MB)
limitReader := io.LimitReader(resp.Body, LimitResponse)
body, err := ioutil.ReadAll(limitReader)
if err != nil {