f = parse("CONTENT-DISPOSITION: ");
assertEquals("", f.getDispositionType());
}
public void testGetParameter() throws Exception {
ContentDispositionField f = parse("CONTENT-DISPOSITION: inline ;"
+ " filename=yada yada");
assertEquals("yada yada", f.getParameter("filename"));
f = parse("Content-Disposition: x-yada;"
+ " fileNAme= \"ya:\\\"*da\"; " + "\tSIZE\t = 1234");
assertEquals("ya:\"*da", f.getParameter("filename"));
assertEquals("1234", f.getParameter("size"));
f = parse("Content-Disposition: x-yada; "
+ "fileNAme= \"ya \\\"\\\"\tda \\\"\"; "
+ "\tx-Yada\t = \"\\\"hepp\\\" =us\t-ascii\"");
assertEquals("ya \"\"\tda \"", f.getParameter("filename"));
assertEquals("\"hepp\" =us\t-ascii", f.getParameter("x-yada"));
}