pmusolino / Wormholy

iOS network debugging, like a wizard 🧙‍♂️
MIT License
2.31k stars 184 forks source link

Fixed an infinite loop blocking bug related to multipart requests #92

Closed yawillianpsb closed 3 years ago

yawillianpsb commented 3 years ago

38

The problem was an infinite while loop that didn't end. When multipart request had begun, loop started and blocked all further requests.

yawillianpsb commented 3 years ago

@pmusolino

pmusolino commented 3 years ago

Good catch @yawillianpsb if this is the reason. Did you test if everything is working fine using only return request.httpBody when there is a multipart request?

yawillianpsb commented 3 years ago

@pmusolino Yes all works fine, except of the request body for multipart/data. All other requests works fine both of them request and response. Without the fix we can't see request body for multipart/form-data anyway. The problem was in while loop. The loop wouldn't stop. I think it's issue in AFNetworking with streams. We are using AFNetworking and maybe it is have bad work with streams.

yawillianpsb commented 3 years ago

@pmusolino

yawillianpsb commented 3 years ago

@pmusolino