Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace 0 bytes instead of raising an exception
This factorize handling of 0 bytes instead of leaving it up to all callers.
- Loading branch information
1 parent
59f2926
commit 451c462
Showing
5 changed files
with
94 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
interactions: | ||
- request: | ||
body: '{"document": "Hello World"}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '27' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- pygitguardian/1.3.4 (Linux;py3.8.10) | ||
method: POST | ||
uri: https://api.gitguardian.com/v1/scan | ||
response: | ||
body: | ||
string: | ||
'{"policy_break_count":0,"policies":["File extensions","Filenames","Secrets | ||
detection"],"policy_breaks":[]}' | ||
headers: | ||
Access-Control-Expose-Headers: | ||
- X-App-Version | ||
Allow: | ||
- POST, OPTIONS | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '106' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 24 Jun 2022 16:08:40 GMT | ||
Referrer-Policy: | ||
- strict-origin-when-cross-origin | ||
Server: | ||
- nginx | ||
Set-Cookie: | ||
- AWSALB=jzG+lNYQFwVa/HLEk17W6yiGRSKg6NTA2/1+uOmn+n5jG7J03MudYdFdbtJdN7+y9jwsoul66j7dHclQD7B8ZRa4FWTZJO3AeCHhfcZQxhwEb5uko4OvEhi9jD2o; | ||
Expires=Fri, 01 Jul 2022 16:08:40 GMT; Path=/ | ||
- AWSALBCORS=jzG+lNYQFwVa/HLEk17W6yiGRSKg6NTA2/1+uOmn+n5jG7J03MudYdFdbtJdN7+y9jwsoul66j7dHclQD7B8ZRa4FWTZJO3AeCHhfcZQxhwEb5uko4OvEhi9jD2o; | ||
Expires=Fri, 01 Jul 2022 16:08:40 GMT; Path=/; SameSite=None; Secure | ||
Strict-Transport-Security: | ||
- max-age=31536000; includeSubDomains | ||
Vary: | ||
- Cookie | ||
X-App-Version: | ||
- v2.7.5 | ||
X-Content-Type-Options: | ||
- nosniff | ||
- nosniff | ||
X-Frame-Options: | ||
- DENY | ||
- SAMEORIGIN | ||
X-Secrets-Engine-Version: | ||
- 2.69.0 | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters