Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use possessive quantifiers in regex for decoding cookies
Decoding cookies becomes very complex to handle for the regex engine when cookie values are very large. This causes `StackOverflowError`s probable due to the catastrophic backtracking Use possessive quantifiers to prevent the regex engine from trying all permutations. This should make the complexity of the regex linear and not exponential. The performance increase can be significant and fixes the issue. Closes #77
- Loading branch information
1 parent
b6eff3a
commit 8513d31
Showing
2 changed files
with
8 additions
and
1 deletion.
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