Skip to content

Conversation

@Azurx
Copy link
Contributor

@Azurx Azurx commented Dec 8, 2019

Intro

As described in the comments, buildActions() in php/midi/src/Midi/Koala/ParseRecorded.php is using for fix http calloutbound when one connection come with multi actions. But can not adapt to condition like:

  • action1
    • request: GET /path/abc?...
    • response: (empty response)
  • action2
    • request: (empty request)
    • response: abc (response part1)
  • action3
    • request: (empty request)
    • response: def (response part2)
      ...

abc, def are both part of whole HTTP response in only one session, it is split to multiple parts because syscall recv() need to receive twice at least to hold the entire response.

When will it appear

  1. A large reponse(over 64kb) in Upstream Calls
  2. A chunked response in Upstream Calls with Transfer-Encoding:chunked in header

Result

Can not replay correctly. In the report, response part1 in action2 was matched with 100% similarity, but reponse in action3 was tagged with "Unknown" Protocol.

Fix

original: Reqeust = action1.request, Response = action2.response;
now: Request = action1.request, Response = action2.response + action3.response + ... + actionN.response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant