Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump httpclient allowed payload limit #538

Merged
merged 6 commits into from
Aug 23, 2019
Merged

Bump httpclient allowed payload limit #538

merged 6 commits into from
Aug 23, 2019

Conversation

qwertyuu
Copy link
Contributor

@qwertyuu qwertyuu commented Aug 21, 2019

Goal

Bring the upload limit closer to the actual Bugsnag's error reporting limit, see: https://github.com/bugsnag/bugsnag-dotnet/blob/96360fb0f8d31f5fd6a8f3f17184bd626421820e/src/Bugsnag/Payload/Report.cs#L16

from bugsnag-dotnet. Also here in the documentation: https://docs.bugsnag.com/platforms/dotnet/asp-net/configuration-options/#maximum-breadcrumbs

Changeset

Changed

Changed MAX_SIZE const in HttpClient to 1024*1024, or 1048576.

Tests

Used the new constant to ensure that "massive payloads" are properly tested if the value ever changes.

Review

For the submitter, initial self-review:

  • Commented on code changes inline explain the reasoning behind the approach
  • Reviewed the test cases added for completeness and possible points for discussion
  • A changelog entry was added for the goal of this pull request
  • Check the scope of the changeset - is everything in the diff required for the pull request?
  • This pull request is ready for:
    • Initial review of the intended approach, not yet feature complete
    • Structural review of the classes, functions, and properties modified
    • Final review

For the pull request reviewer(s), this changeset has been reviewed for:

  • Consistency across platforms for structures or concepts added or modified
  • Consistency between the changeset and the goal stated above
  • Internal consistency with the rest of the library - is there any overlap between existing interfaces and any which have been added?
  • Usage friction - is the proposed change in usage cumbersome or complicated?
  • Performance and complexity - are there any cases of unexpected O(n^3) when iterating, recursing, flat mapping, etc?
  • Concurrency concerns - if components are accessed asynchronously, what issues will arise
  • Thoroughness of added tests and any missing edge cases
  • Idiomatic use of the language

@GrahamCampbell
Copy link
Contributor

@kattrali I wonder if the payload limit was 512kb in 2015, which would explain why the code is like this?

Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @qwertyuu! I took a quick look and it seems fine aside from a few small issues.

src/HttpClient.php Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
tests/HttpClientTest.php Outdated Show resolved Hide resolved
@qwertyuu
Copy link
Contributor Author

@kattrali 👍

@qwertyuu
Copy link
Contributor Author

@kattrali Comment added!

@kattrali
Copy link
Contributor

Thanks for the quick edits! ⚡️

@kattrali kattrali merged commit 0fb8689 into bugsnag:master Aug 23, 2019
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.

3 participants