Wrong url encoding if redirect's location header contains Russian letters

Fixed Issue #11248884

Details

Author
Anton Z.
Created
Mar 13, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce the issue:
Open http://zakupka.com/t/search/ and in search box type "привет мир".

Request log

[REQUEST]
GET http://zakupka.com/t/search/%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82%20%D0%BC%D0%B8%D1%80/?bs HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Referer: http://zakupka.com/t/search/%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82%20123/?bs
Accept-Language: en-US,en;q=0.7,ru;q=0.3
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
Accept-Encoding: gzip, deflate
Host: zakupka.com
Connection: Keep-Alive
Cookie: PHPSESSID=633fca6e92467b3913df561443265878; SC_USER_IDENT=11081584658c64db0440592.96335065; _ym_uid=1489391025911735815; _ym_isad=2; _ga=GA1.2.1760985667.1489391026; _ym_visorc_25403918=b; timezone=America%2FLos_Angeles

[RESPONSE]
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Mon, 13 Mar 2017 09:21:44 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: PHPSESSID=633fca6e92467b3913df561443265878; expires=Tue, 14-Mar-2017 09:21:44 GMT; Max-Age=86400; path=/; domain=.zakupka.com; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
location: /t/search/привет мир/?sc
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block;

0

[REQUEST]
GET http://zakupka.com/t/search/%D0%A0%D1%97%D0%A1%D0%82%D0%A0%D1%91%D0%A0%D0%86%D0%A0%C2%B5%D0%A1%E2%80%9A%20%D0%A0%D1%98%D0%A0%D1%91%D0%A1%D0%82/?sc HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Referer: http://zakupka.com/t/search/%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82%20123/?bs
Accept-Language: en-US,en;q=0.7,ru;q=0.3
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
Accept-Encoding: gzip, deflate
Host: zakupka.com
Connection: Keep-Alive
Cookie: PHPSESSID=633fca6e92467b3913df561443265878; SC_USER_IDENT=11081584658c64db0440592.96335065; _ym_uid=1489391025911735815; _ym_isad=2; _ga=GA1.2.1760985667.1489391026; _ym_visorc_25403918=b; timezone=America%2FLos_Angeles

[RESPONSE]
HTTP/1.1 404 Not Found
Server: nginx
Date: Mon, 13 Mar 2017 09:21:44 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=633fca6e92467b3913df561443265878; expires=Tue, 14-Mar-2017 09:21:44 GMT; Max-Age=86400; path=/; domain=.zakupka.com; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 85887

<!DOCTYPE html>
<html lang="ru">
<head>
    
<title>Zakupka.com - ничего не найдено</title>
<!--favicons-->
<link rel="apple-touch-icon" sizes="57x57" href="/pics/favicons/apple-icon-57x57.png">
// html markup

In first response we see location header with russian letters:
location: /t/search/привет мир/?sc

it’s translated to next request GET http://zakupka.com/t/search/%D0%A0%D1%97%D0%A1%D0%82%D0%A0%D1%91%D0%A0%D0%86%D0%A0%C2%B5%D0%A1%E2%80%9A%20%D0%A0%D1%98%D0%A0%D1%91%D0%A1%D0%82/?sc. Decoded value is http://zakupka.com/t/search/привет РјРёСЂ/?sc, where the "привет РјРёСЂ" is "привет мир" in CP1251 encoding.

but have to translate to GET http://zakupka.com/t/search/%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82%20%D0%BC%D0%B8%D1%80/?sc

Attachments

0 attachments

    Comments and activity

    • Changed Title from “Wrong link encoding if redirect's location header contains Russian letters” to “Wrong url encoding if redirect's location header contains Russian letters”

    • Microsoft Edge Team

      Changed Assigned To to “James M.”

      Changed Status to “Fixed”

    • Hello,

      Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge 15145 and will be available in a new build.

      Best Wishes,

      The MS Edge Team

    You need to sign in to your Microsoft account to add a comment.

    Sign in