Fix function signature, use default random boundary (#3422)

Fixes the function signature of `parseMultipartResponse` and uses the
default random boundary when creating a new multipart response.
This commit is contained in:
Till 2024-09-13 09:39:30 +02:00 committed by GitHub
parent 002fed3cb9
commit ed6d964e5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 21 deletions

View file

@ -35,7 +35,7 @@ func Test_Multipart(t *testing.T) {
assert.NoError(t, err)
defer resp.Body.Close()
// contentLength is always 0, since there's no Content-Length header on the multipart part.
err, _, reader := parseMultipartResponse(r, resp, 1000)
_, reader, err := parseMultipartResponse(r, resp, 1000)
assert.NoError(t, err)
gotResponse, err := io.ReadAll(reader)
assert.NoError(t, err)