Skip to content

Commit d42d86c

Browse files
authored
Merge pull request #107 from php-http/captured_body_length
Allow 0 for captured_body_length
2 parents bb6ac80 + f41e243 commit d42d86c

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,8 @@ public function getConfigTreeBuilder()
105105
->defaultValue($this->debug)
106106
->end()
107107
->scalarNode('formatter')->defaultNull()->end()
108-
->scalarNode('captured_body_length')
108+
->integerNode('captured_body_length')
109109
->defaultValue(0)
110-
->canNotBeEmpty()
111110
->info('Limit long HTTP message bodies to x characters. If set to 0 we do not read the message body. Only available with the default formatter (FullHttpMessageFormatter).')
112111
->end()
113112
->end()

Tests/Resources/Fixtures/config/full.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
'toolbar' => [
1717
'enabled' => true,
1818
'formatter' => 'my_toolbar_formatter',
19+
'captured_body_length' => 0,
1920
],
2021
'plugins' => [
2122
'authentication' => [

Tests/Resources/Fixtures/config/full.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<uri-factory>Http\Message\UriFactory\GuzzleUriFactory</uri-factory>
1515
<stream-factory>Http\Message\StreamFactory\GuzzleStreamFactory</stream-factory>
1616
</classes>
17-
<toolbar enabled="true" formatter="my_toolbar_formatter"/>
17+
<toolbar enabled="true" formatter="my_toolbar_formatter" captured_body_length="0"/>
1818
<plugins>
1919
<authentication>
2020
<my_basic type="basic" username="foo" password="bar"/>

Tests/Resources/Fixtures/config/full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ httplug:
1212
toolbar:
1313
enabled: true
1414
formatter: my_toolbar_formatter
15+
captured_body_length: 0
1516
plugins:
1617
authentication:
1718
my_basic:

0 commit comments

Comments
 (0)