@@ -64,6 +64,9 @@ Scenario: A POST request with form data sends a report with the parsed request b
6464 And the event "metaData.request.httpVersion" matches "^HTTP/\d\.\d $"
6565 And the event "metaData.request.params.a" equals "123"
6666 And the event "metaData.request.params.b" equals "456"
67+ And the event "metaData.request.params.name" equals "baba"
68+ And the event "metaData.request.params.favourite_letter" equals "z"
69+ And the event "metaData.request.params.password" equals "[FILTERED]"
6770 And the event "metaData.request.referer" is null
6871 And the event "metaData.request.url" ends with "/unhandled?a=123&b=456"
6972
@@ -86,6 +89,9 @@ Scenario: A POST request with JSON sends a report with the parsed request body a
8689 And the event "metaData.request.httpVersion" matches "^HTTP/\d\.\d $"
8790 And the event "metaData.request.params.a" equals "123"
8891 And the event "metaData.request.params.b" equals "456"
92+ And the event "metaData.request.params.name" is null
93+ And the event "metaData.request.params.favourite_letter" is null
94+ And the event "metaData.request.params.password" is null
8995 And the event "metaData.request.referer" is null
9096 And the event "metaData.request.url" ends with "/unhandled?a=123&b=456"
9197
@@ -172,3 +178,55 @@ Scenario: clearing feature flags for an unhandled error
172178 And I wait to receive an error
173179 Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
174180 And the event has no feature flags
181+
182+ @not-rack-1
183+ @not-rack-2
184+ Scenario : An unrewindable POST request with form data does not attach request body
185+ Given I set environment variable "BUGSNAG_RACK_NO_REWIND" to "true"
186+ And I start the rack service
187+ When I send a POST request to "/unhandled?a=123&b=456" in the rack app with the following form data:
188+ | name | baba |
189+ | favourite_letter | z |
190+ | password | password1 |
191+ And I wait to receive an error
192+ Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
193+ And the event "metaData.request.body" is null
194+ And the event "metaData.request.clientIp" is not null
195+ And the event "metaData.request.cookies" is null
196+ And the event "metaData.request.headers.Host" is not null
197+ And the event "metaData.request.headers.User-Agent" is not null
198+ And the event "metaData.request.httpMethod" equals "POST"
199+ And the event "metaData.request.httpVersion" matches "^HTTP/\d\.\d $"
200+ And the event "metaData.request.params.a" equals "123"
201+ And the event "metaData.request.params.b" equals "456"
202+ And the event "metaData.request.params.name" is null
203+ And the event "metaData.request.params.favourite_letter" is null
204+ And the event "metaData.request.params.password" is null
205+ And the event "metaData.request.referer" is null
206+ And the event "metaData.request.url" ends with "/unhandled?a=123&b=456"
207+
208+ @not-rack-1
209+ @not-rack-2
210+ Scenario : An unrewindable POST request with JSON does not attach request body
211+ Given I set environment variable "BUGSNAG_RACK_NO_REWIND" to "true"
212+ And I start the rack service
213+ When I send a POST request to "/unhandled?a=123&b=456" in the rack app with the following JSON:
214+ | name | baba |
215+ | favourite_letter | z |
216+ | password | password1 |
217+ And I wait to receive an error
218+ Then the error is valid for the error reporting API version "4.0" for the "Ruby Bugsnag Notifier" notifier
219+ And the event "metaData.request.body" is null
220+ And the event "metaData.request.clientIp" is not null
221+ And the event "metaData.request.cookies" is null
222+ And the event "metaData.request.headers.Host" is not null
223+ And the event "metaData.request.headers.User-Agent" is not null
224+ And the event "metaData.request.httpMethod" equals "POST"
225+ And the event "metaData.request.httpVersion" matches "^HTTP/\d\.\d $"
226+ And the event "metaData.request.params.a" equals "123"
227+ And the event "metaData.request.params.b" equals "456"
228+ And the event "metaData.request.params.name" is null
229+ And the event "metaData.request.params.favourite_letter" is null
230+ And the event "metaData.request.params.password" is null
231+ And the event "metaData.request.referer" is null
232+ And the event "metaData.request.url" ends with "/unhandled?a=123&b=456"
0 commit comments