-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not make the encoded document larger than expected
The Unicode replacement character becomes 2 bytes in UTF-8 (0xFF 0xFD). Replacing \0 with this character causes the encoded string to be one byte longer, making it possible for the encoded document to be longer than the maximum document size. Use the ASCII substitute character instead: it's only 1 byte long in UTF-8, so it does not make the encoded document grow.
- Loading branch information
1 parent
da5d95d
commit 5164a72
Showing
4 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
changelog.d/20230712_172917_aurelien.gateau_fix_maximum_size_check.md
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,3 @@ | ||
### Fixed | ||
|
||
- Do not make documents longer when preparing them to be sent to the API. |
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