Skip to content

Commit

Permalink
Merge pull request #156 from aantron/master
Browse files Browse the repository at this point in the history
Custom percent-encoders: don't mutate base encoder
  • Loading branch information
avsm authored Apr 26, 2021
2 parents b4a8375 + cea5678 commit 482a034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/uri.ml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module Generic : Scheme = struct
| `Fragment -> safe_chars_for_fragment
| `Scheme -> safe_chars_for_scheme
| `Custom ((component : component), safe, unsafe) ->
let safe_chars = safe_chars_for_component component in
let safe_chars = Array.copy (safe_chars_for_component component) in
for i = 0 to String.length safe - 1 do
let c = Char.code safe.[i] in
safe_chars.(c) <- true
Expand Down

0 comments on commit 482a034

Please sign in to comment.