intuit / Tank

Tank is a downloadable application that can be used to load test websites
Eclipse Public License 1.0
84 stars 61 forks source link

Filter by content-type to save responseBody #321

Open Zakaria-Kofiro opened 4 months ago

Zakaria-Kofiro commented 4 months ago

Filter by content-type to save responseBody Skips step to save response data based on content-type to avoid holding on to large responses:

if (checkContentType(contentType)) {
    responseBody = is.readAllBytes();
} else {
     is.readAllBytes();
}

Filters out any response data with Content-Type:

Please make sure these check boxes are checked before submitting

PR review process

kevin-mcgoldrick commented 4 months ago

@Zakaria-Kofiro Rather than hardcoding the excluded mime types. Can we read the list in from the settings files that already contains

    <!-- Mime type rgex for logging of response body on error. -->
    <valid-mime-types>
      <mime-type-regex>.*text.*</mime-type-regex>
      <mime-type-regex>.*json.*</mime-type-regex>
      <mime-type-regex>.*xml.*</mime-type-regex>
    </valid-mime-types>