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
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

## TBD

Bump max payload limit to follow Bugsnag's backend limit to enable larger errors

### Enhancements

* Bump max payload limit to follow Bugsnag's backend limit to enable larger errors
[#538](https://github.com/bugsnag/bugsnag-php/pull/538)

## 3.17.0 (2019-05-28)

Add the version of PHP to report information to allow easier diagnosis of version-specific issues.
Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class HttpClient
*
* @var int
*/
const MAX_SIZE = 500000;
const MAX_SIZE = 1048576;
qwertyuu marked this conversation as resolved.
Show resolved Hide resolved

/**
* The current payload version.
Expand Down
6 changes: 3 additions & 3 deletions tests/HttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function testMassiveMetaDataHttpClient()
$this->guzzle->expects($spy = $this->any())->method('post');

// Add a report to the http and deliver it
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setMetaData(['foo' => str_repeat('A', 1000000)]));
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setMetaData(['foo' => str_repeat('A', 1500000)]));
$this->http->send();

$this->assertCount(1, $invocations = $spy->getInvocations());
Expand Down Expand Up @@ -110,7 +110,7 @@ public function testMassiveUserHttpClient()
$this->guzzle->expects($spy = $this->any())->method('post');

// Add a report to the http and deliver it
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setUser(['foo' => str_repeat('A', 1000000)]));
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setUser(['foo' => str_repeat('A', 1500000)]));
$this->http->send();

$this->assertCount(0, $spy->getInvocations());
Expand All @@ -126,7 +126,7 @@ public function testPartialHttpClient()
$this->guzzle->expects($spy = $this->any())->method('post');

// Add two errors to the http and deliver them
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setUser(['foo' => str_repeat('A', 1000000)]));
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setUser(['foo' => str_repeat('A', 1500000)]));
$this->http->queue(Report::fromNamedError($this->config, 'Name')->setUser(['foo' => 'bar']));
$this->http->send();

Expand Down