You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using stub using proxy and matching body with content type:
Multipart form data
Form data
Expect proxy success
Actual Behavior
Observe the error http: ContentLength=32 with Body length 0
Steps to Reproduce the Problem
Using stub using proxy and matching body with content type:
Multipart form data
Form data
Potential root cause
SincematchJSONBody using readRequestBody function which return a new reader, matchMultiplePart and matchURLEncodedBody use ParseMultipartForm of HTTP package directly -> This lead to original request body is read once.
Suggest solution
Transform request.Body to some struct implement the interface io.Seeker and call Seek(0,0) to reset the reader for each time call to matchBody
Specifications
Version: newest release (1.2.4)
The text was updated successfully, but these errors were encountered:
Expected Behavior
Using stub using proxy and matching body with content type:
Expect proxy success
Actual Behavior
Observe the error
http: ContentLength=32 with Body length 0
Steps to Reproduce the Problem
Using stub using proxy and matching body with content type:
Potential root cause
Since
matchJSONBody
usingreadRequestBody
function which return a new reader,matchMultiplePart
andmatchURLEncodedBody
useParseMultipartForm
of HTTP package directly -> This lead to original request body is read once.Suggest solution
io.Seeker
and callSeek(0,0)
to reset the reader for each time call tomatchBody
Specifications
Version: newest release (1.2.4)
The text was updated successfully, but these errors were encountered: