Skip to content

Filter by content-type to save responseBody#321

Merged
Zakaria-Kofiro merged 20 commits intomasterfrom
zkofiro/SRE-30670
Sep 20, 2024
Merged

Filter by content-type to save responseBody#321
Zakaria-Kofiro merged 20 commits intomasterfrom
zkofiro/SRE-30670

Conversation

@Zakaria-Kofiro
Copy link
Collaborator

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:

  • application/pdf
  • audio/*
  • video/*
  • image/*

Please make sure these check boxes are checked before submitting

  • ** Squashed Commits **
  • ** All Tests Passed ** - mvn clean test -P default

** PR review process **

  • Requires one +1 from a reviewer
  • Repository owners will merge your PR once it is approved.

@kevin-mcgoldrick
Copy link
Collaborator

@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>

kevin-mcgoldrick and others added 16 commits June 18, 2024 14:53
* Disallow Doctype Decleration

* disable DTD in XMLInputFactory of the ScriptProcessor
---------

Co-authored-by: zkofiro <zakaria_kofiro@intuit.com>
…ate and Max Users/Sec per Agent (#320)

* initial implementation

* unneeded

---------

Co-authored-by: zkofiro <zakaria_kofiro@intuit.com>
* Tank V2 API Module Refactor

* unneeded test file

* updating pom

* missing resource file for tests

* update all requests w/ auth header

* small updates, unneeded files

---------

Co-authored-by: zkofiro <zakaria_kofiro@intuit.com>
#325)

* Tank V2 API Module Refactor

* unneeded test file

* updating pom

* missing resource file for tests

* update all requests w/ auth header

* moving to new branch

* small updates, unneeded files

* small fixes, unit tests, and fix for script upload error

* match convention

---------

Co-authored-by: zkofiro <zakaria_kofiro@intuit.com>
Co-authored-by: zkofiro <zakaria_kofiro@intuit.com>
* Add JDK Http Client
* Remove: apache httpclient 5
@kevin-mcgoldrick kevin-mcgoldrick marked this pull request as ready for review September 19, 2024 19:03
@kevin-mcgoldrick kevin-mcgoldrick self-requested a review September 19, 2024 19:03
@Zakaria-Kofiro Zakaria-Kofiro merged commit 2ffdfae into master Sep 20, 2024
kevin-mcgoldrick added a commit that referenced this pull request Jan 16, 2025
* master: (46 commits)
  Update doPUT to add boundary to multi-part + add doPatch  (#363)
  Reduce Regex on RESPONSE_BODY (#362)
  CVE-2024-38827 (#351)
  add JobMakerTest (#361)
  Update AWS bom (#359)
  Bump org.apache.tomcat:tomcat-catalina from 11.0.1 to 11.0.2 (#357)
  updating command (#356)
  Update AgentStartup command to pass in list of arguments (#355)
  Enable Connection Manager Sharing in Apache Http 4.5 (#353)
  Agent Debugger Export Responses (CSV) (#350)
  Update Tomcat Release to 11
  Project SaveAs now correctly copies all project values (#345)
  make sure that simulation time is met (#346)
  Prep Snapshot 4.1.1
  Release 4.1.0
  Library Updates (#344)
  single instance object mapper shared for the life of the apimonitor (#343)
  Filter by content-type to save responseBody (#321)
  cancel button working when canceling script group deletion (#342)
  Updating Agent Startup Command (#341)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants