/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6641309
* @summary Wrong Cookie separator used in HttpURLConnection
*/
public class B6641309
{
{
new B6641309();
}
public B6641309()
{
try {
doClient();
} catch (IOException ioe) {
}
}
void doClient() {
try {
// GET Request
// preload the CookieHandler with a cookie for our URL
// so that it will be sent during the first request
if (resp != 200)
throw new RuntimeException("Failed: Response code from GET is not 200");
} catch (IOException e) {
e.printStackTrace();
} catch (URISyntaxException e) {
e.printStackTrace();
} finally {
}
}
/**
* Http Server
*/
// create HttpServer context
httpServer.start();
}
int i = 0;
// Read till end of stream
do {
} while (i != -1);
// The separator between the 2 cookies should be
// a semi-colon AND a space
}
}
t.close();
}
}
}