Skip to content

Commit

Permalink
Custom percent-encoders: don't mutate base encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
aantron committed Apr 18, 2021
1 parent b4a8375 commit cea5678
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 cea5678

Please sign in to comment.