Index: src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java =================================================================== --- src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java +++ src/test/api/common/org/apache/harmony/luni/tests/java/net/URLTest.java @@ -99,6 +99,34 @@ } } + /** + * Check when the argument in url consists of quotation marks character + * @tests java.net.URL#openConnection(Proxy) + * @throws Exception + */ + public void test_openConnection_quotation_marks_character() throws IOException { + int port = 0; + HttpURLConnection con = null; + try { + port = Support_Jetty.startDefaultHttpServer(); + } catch (Exception e) { + fail("Exception during setup jetty : " + e.getMessage()); + } + try { + URL url = new URL("http://0.0.0.0:" + port + "/servlet?ResourceName=[\"11111\",\"22222\"]"); + con = (HttpURLConnection)url.openConnection(); + con.setDoInput(true); + con.setDoOutput(true); + con.setUseCaches(false); + con.setRequestMethod("GET"); + InputStream is = con.getInputStream(); + } catch (Exception e) { + fail("Unexpected exception : " + e.getMessage()); + } finally { + con.disconnect(); + } + } + /** * @tests java.net.URL#URL(java.lang.String) */ Index: src/main/java/java/net/URI.java =================================================================== --- src/main/java/java/net/URI.java +++ src/main/java/java/net/URI.java @@ -41,7 +41,7 @@ static final String someLegal = unreserved + punct; - static final String queryLegal = unreserved + reserved + "\\"; + static final String queryLegal = unreserved + reserved + "\\\""; static final String allLegal = unreserved + reserved;