JETTY-1151 JETTY-1098 allow UTF-8 with 0 carry bits
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1179 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
acb98b34be
commit
cbd9ed8386
|
@ -12,6 +12,7 @@ jetty-7.0.2-SNAPSHOT
|
|||
+ JETTY-1155 HttpConnection.close notifies HttpExchange
|
||||
+ JETTY-1156 SSL blocking close with JVM Bug busy key fix
|
||||
+ JETTY-1157 Don't hold array passed in write(byte[])
|
||||
+ JETTY-1151 JETTY-1098 allow UTF-8 with 0 carry bits
|
||||
+ COMETD-46 reset ContentExchange response content on resend
|
||||
|
||||
jetty-7.0.1.v20091125 25 November 2009
|
||||
|
|
|
@ -110,8 +110,6 @@ public class Utf8StringBuffer
|
|||
throw new IllegalArgumentException("!utf8");
|
||||
}
|
||||
|
||||
if (_bits==0)
|
||||
throw new IllegalArgumentException("!utf8");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -107,9 +107,6 @@ public class Utf8StringBuilder
|
|||
{
|
||||
throw new IllegalArgumentException("!utf8");
|
||||
}
|
||||
|
||||
if (_bits==0)
|
||||
throw new IllegalArgumentException("!utf8");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -183,5 +183,16 @@ public class URLEncodedTest extends junit.framework.TestCase
|
|||
else
|
||||
assertTrue("Charset Shift_JIS not supported by jvm", true);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------------------------- */
|
||||
public void testUtf8()
|
||||
throws Exception
|
||||
{
|
||||
UrlEncoded url_encoded = new UrlEncoded();
|
||||
assertEquals("Empty",0, url_encoded.size());
|
||||
|
||||
url_encoded.clear();
|
||||
url_encoded.decode("text=%E0%B8%9F%E0%B8%AB%E0%B8%81%E0%B8%A7%E0%B8%94%E0%B8%B2%E0%B9%88%E0%B8%81%E0%B8%9F%E0%B8%A7%E0%B8%AB%E0%B8%AA%E0%B8%94%E0%B8%B2%E0%B9%88%E0%B8%AB%E0%B8%9F%E0%B8%81%E0%B8%A7%E0%B8%94%E0%B8%AA%E0%B8%B2%E0%B8%9F%E0%B8%81%E0%B8%AB%E0%B8%A3%E0%B8%94%E0%B9%89%E0%B8%9F%E0%B8%AB%E0%B8%99%E0%B8%81%E0%B8%A3%E0%B8%94%E0%B8%B5&Action=Submit");
|
||||
assertEquals("ฟหกวดา่กฟวหสดา่หฟกวดสาฟกหรด้ฟหนกรดี",url_encoded.get("text"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue