fix(app): collection fetches addresses with Korean paths and words
The request line is ASCII: other characters and spaces in the path and query go as UTF-8 %HH, while existing %HH and separators stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -321,6 +321,13 @@ def test_the_fetcher_never_logs_the_address(monkeypatch, capfd):
|
||||
assert "secret-host" not in out.err + out.out and "abc123" not in out.err + out.out
|
||||
|
||||
|
||||
def test_addresses_with_korean_paths_and_words_are_fetched(loopback_is_public):
|
||||
port, hits = serve(answer(b"ok"))
|
||||
assert safe_get(f"http://127.0.0.1:{port}/wiki/대한민국?q=한글 검색&x=%2F#top") == b"ok"
|
||||
from urllib.parse import quote
|
||||
assert hits == [f"/wiki/{quote('대한민국')}?q={quote('한글')}%20{quote('검색')}&x=%2F"]
|
||||
|
||||
|
||||
def test_a_response_cut_short_is_a_failure_not_a_page(loopback_is_public):
|
||||
def short(req):
|
||||
req.send_response(200)
|
||||
|
||||
Reference in New Issue
Block a user