Skip to content

Commit

Permalink
cannot urlencode URL itself with curl
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Feb 7, 2025
1 parent ec885d0 commit 9898012
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions e2e/tests-dfx/assetscanister.bash
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,13 @@ check_permission_failure() {

dfx canister call --query e2e_project_frontend list '(record {})'

# decode as expected
# decode as expected - %c3%a6 is the utf-8 encoding of the ae symbol
assert_command dfx canister call --query e2e_project_frontend http_request '(record{url="/%c3%a6";headers=vec{};method="GET";body=vec{}})'
assert_match "filename is an ae symbol" # candid looks like blob "filename is \c3\a6\0a"

assert_command curl --fail -vv http://localhost:"$PORT"/%c3%a6?canisterId="$ID"
assert_match "filename is an ae symbol"

assert_command curl --fail -vv http://localhost:"$PORT"?canisterId="$ID"
assert_match "filename is an ae symbol"

# fails with because %e6 is not valid utf-8 percent encoding
assert_command_fail curl --fail -vv http://localhost:"$PORT"/%e6?canisterId="$ID"
assert_contains "500 Internal Server Error"
Expand Down

0 comments on commit 9898012

Please sign in to comment.