Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support paths using 2-byte characters #70

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

sinsoku
Copy link
Contributor

@sinsoku sinsoku commented Jan 28, 2024

The following error occurs when the path contains 2-byte characters.

URI::InvalidURIError:
  URI must be ascii only "http://localhost:4567/\u732B"

Referring to the Capybara implementation, use Addressable instead of URI
to support 2-byte characters.
refs: https://github.com/teamcapybara/capybara/blob/3.40.0/lib/capybara/session.rb#L261

The following error occurs when the path contains 2-byte characters.

```
URI::InvalidURIError:
  URI must be ascii only "http://localhost:4567/\u732B"
```

Referring to the Capybara implementation, use Addressable instead of URI
to support 2-byte characters.
refs: https://github.com/teamcapybara/capybara/blob/3.40.0/lib/capybara/session.rb#L261
elsif Capybara.default_host
URI(Capybara.default_host).merge(path)
Addressable::URI.parse(Capybara.default_host) + path
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YusukeIwaki
Copy link
Owner

Thank you!

@YusukeIwaki
Copy link
Owner

CI failure will be fixed on another PR. I will merge this.

@YusukeIwaki YusukeIwaki merged commit 2dccc51 into YusukeIwaki:main Feb 16, 2024
2 of 8 checks passed
@sinsoku sinsoku deleted the support-paths-using-2bytes branch February 16, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants