[APMSP-3102] Fix HTTP client body parsing#5990
Conversation
Typing analysisNote: Ignored files are excluded from the next sections.
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 4257cdb | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4257cdbdfe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| end | ||
|
|
||
| content_length_value = headers['content-length'] | ||
| if !content_length_value.is_a?(String) || !content_length_value.match?(/\A[1-9][0-9]*\z/) |
There was a problem hiding this comment.
as discussed, regex can be dropped here
| end | ||
|
|
||
| content_length_value = headers['content-length'] | ||
| if !content_length_value.is_a?(String) || !content_length_value.match?(/\A[1-9][0-9]*\z/) |
What does this PR do?
Adds configurable limit on request/response body size for WAF analysis during downstream requests for supported HTTP contribs
Motivation:
Fix APPSEC-68529
Fix APPSEC-68522
Fix APPSEC-68551
Change log entry
Yes. Add size-awareness for downstream HTTP body analysis
Additional Notes:
All clients share same-looking code for request/response parsing, but no extraction was done. It's hard to generalize that for multi-purpose, hence going to live as duplication for now.
How to test the change?
CI