Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7461 Always encode the path part of an URI as UTF-8 Test: http/tests/uri/utf8-path.html * platform/KURL.cpp: (encodeRelativeString): Always set pathEncoding to UTF-8. Canonical link: https://commits.webkit.org/12626@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
ccc5170
commit 7e07753
Showing
7 changed files
with
83 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
RewriteEngine on | ||
RewriteRule ^.* /uri/resources/print-uri.php [L,NS] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
header("Content-Type: text/javascript"); | ||
header("Expires: Thu, 01 Dec 2003 16:00:00 GMT\n"); | ||
header("Cache-Control: no-store, no-cache, must-revalidate\n"); | ||
header("Pragma: no-cache\n"); | ||
echo "document.write('" . $_SERVER['REQUEST_URI'] . "');"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Test for bug 7461: Always encode the path part of an URI as UTF-8 | ||
|
||
Test the URL as it is passed to the server. WinIE 6 and Firefox 3.0a results are currently diffrerent: IE uses the target encoding for the query path, while Firefox uses the page encoding. Also, WinIE doesn't percent-encode the query path. | ||
"/uri/intercept/print/%D1%84%D0%B0%D0%B9%D0%BB.js?%F7%E5%E9=%EC%EE%E9" (no target charset specified) | ||
"/uri/intercept/print/%D1%84%D0%B0%D0%B9%D0%BB.js?%F7%E5%E9=%EC%EE%E9" (target charset=windows-1251, same as page) | ||
"/uri/intercept/print/%D1%84%D0%B0%D0%B9%D0%BB.js?%F7%E5%E9=%EC%EE%E9" (target charset=iso-8859-5) | ||
|
||
Show the source attribute of the scripts. WinIE 6 doesn't use percent encoding here, while Firefox does. | ||
"http://127.0.0.1:8000/uri/intercept/print/%D1%84%D0%B0%D0%B9%D0%BB.js?%F7%E5%E9=%EC%EE%E9" | ||
"http://127.0.0.1:8000/uri/intercept/print/%D1%84%D0%B0%D0%B9%D0%BB.js?%F7%E5%E9=%EC%EE%E9" | ||
"http://127.0.0.1:8000/uri/intercept/print/%D1%84%D0%B0%D0%B9%D0%BB.js?%F7%E5%E9=%EC%EE%E9" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> | ||
</head> | ||
<body> | ||
|
||
<script> | ||
if (window.layoutTestController) | ||
layoutTestController.dumpAsText(); | ||
</script> | ||
|
||
<p>Test for <a href='http://bugzilla.opendarwin.org/show_bug.cgi?id=7461'>bug 7461</a>: | ||
Always encode the path part of an URI as UTF-8</p> | ||
|
||
Test the URL as it is passed to the server. WinIE 6 and Firefox 3.0a results are currently diffrerent: | ||
IE uses the target encoding for the query path, while Firefox uses the page encoding. Also, WinIE doesn't percent-encode | ||
the query path.<br> | ||
"<script id=scr1 src="intercept/print/ôàéë.js?÷åé=ìîé"></script>" (no target charset specified)<br> | ||
"<script id=scr2 charset="windows-1251" src="intercept/print/ôàéë.js?÷åé=ìîé"></script>" (target charset=windows-1251, same as page)<br> | ||
"<script id=scr3 charset="iso-8859-5" src="intercept/print/ôàéë.js?÷åé=ìîé"></script>" (target charset=iso-8859-5)<br><br> | ||
|
||
Show the source attribute of the scripts. WinIE 6 doesn't use percent encoding here, while Firefox does.<br> | ||
<script> | ||
try { | ||
document.write('"' + document.scripts[1].src + '"<br>'); | ||
document.write('"' + document.scripts[2].src + '"<br>'); | ||
document.write('"' + document.scripts[3].src + '"<br>'); | ||
} catch (ex) { | ||
document.write('"' + document.getElementById("scr1").src + '"<br>'); | ||
document.write('"' + document.getElementById("scr2").src + '"<br>'); | ||
document.write('"' + document.getElementById("scr3").src + '"<br>'); | ||
} | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters