304658
304698 git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1340 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
7ef7c9c6ef
commit
e2e5f03cc2
|
@ -22,6 +22,8 @@ jetty-7.0.2-SNAPSHOT
|
||||||
+ 303526 Added include cyphers
|
+ 303526 Added include cyphers
|
||||||
+ 304307 Handle ;jsessionid in FROM Auth
|
+ 304307 Handle ;jsessionid in FROM Auth
|
||||||
+ 304532 Skip some tests on IBM JVMs until resolved
|
+ 304532 Skip some tests on IBM JVMs until resolved
|
||||||
|
+ 304658 Inconsistent Expires date format in Set-Cookie headers with maxAge=0
|
||||||
|
+ 304698 org.eclipse.jetty.http.HttpFields$DateGenerator.formatCookieDate() uses wrong (?) date format
|
||||||
+ JETTY-776 Make new session-tests module to concentrate all reusable session clustering test code
|
+ JETTY-776 Make new session-tests module to concentrate all reusable session clustering test code
|
||||||
+ JETTY-910 Allow request listeners to access session
|
+ JETTY-910 Allow request listeners to access session
|
||||||
+ JETTY-983 Range handling cleanup
|
+ JETTY-983 Range handling cleanup
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class HttpFields
|
||||||
int day_of_month = gc.get(Calendar.DAY_OF_MONTH);
|
int day_of_month = gc.get(Calendar.DAY_OF_MONTH);
|
||||||
int month = gc.get(Calendar.MONTH);
|
int month = gc.get(Calendar.MONTH);
|
||||||
int year = gc.get(Calendar.YEAR);
|
int year = gc.get(Calendar.YEAR);
|
||||||
year = year % 100;
|
year = year % 10000;
|
||||||
|
|
||||||
int epoch = (int) ((date / 1000) % (60 * 60 * 24));
|
int epoch = (int) ((date / 1000) % (60 * 60 * 24));
|
||||||
int seconds = epoch % 60;
|
int seconds = epoch % 60;
|
||||||
|
@ -147,7 +147,8 @@ public class HttpFields
|
||||||
buf.append('-');
|
buf.append('-');
|
||||||
buf.append(MONTHS[month]);
|
buf.append(MONTHS[month]);
|
||||||
buf.append('-');
|
buf.append('-');
|
||||||
StringUtil.append2digits(buf, year);
|
StringUtil.append2digits(buf, year/100);
|
||||||
|
StringUtil.append2digits(buf, year%100);
|
||||||
|
|
||||||
buf.append(' ');
|
buf.append(' ');
|
||||||
StringUtil.append2digits(buf, hours);
|
StringUtil.append2digits(buf, hours);
|
||||||
|
@ -183,13 +184,25 @@ public class HttpFields
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
/**
|
/**
|
||||||
* Format "EEE, dd-MMM-yy HH:mm:ss 'GMT'" for cookies
|
* Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookies
|
||||||
*/
|
*/
|
||||||
public static void formatCookieDate(StringBuilder buf, long date)
|
public static void formatCookieDate(StringBuilder buf, long date)
|
||||||
{
|
{
|
||||||
__dateGenerator.get().formatCookieDate(buf,date);
|
__dateGenerator.get().formatCookieDate(buf,date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
|
/**
|
||||||
|
* Format "EEE, dd-MMM-yyyy HH:mm:ss 'GMT'" for cookies
|
||||||
|
*/
|
||||||
|
public static String formatCookieDate(long date)
|
||||||
|
{
|
||||||
|
StringBuilder buf = new StringBuilder(28);
|
||||||
|
formatCookieDate(buf, date);
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
private final static String __dateReceiveFmt[] =
|
private final static String __dateReceiveFmt[] =
|
||||||
|
@ -274,14 +287,16 @@ public class HttpFields
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public final static String __01Jan1970 = formatDate(0).trim();
|
public final static String __01Jan1970=formatCookieDate(0);
|
||||||
public final static Buffer __01Jan1970_BUFFER = new ByteArrayBuffer(__01Jan1970);
|
public final static Buffer __01Jan1970_BUFFER=new ByteArrayBuffer(__01Jan1970);
|
||||||
|
|
||||||
/* -------------------------------------------------------------- */
|
/* -------------------------------------------------------------- */
|
||||||
protected final ArrayList<Field> _fields = new ArrayList<Field>(20);
|
protected final ArrayList<Field> _fields = new ArrayList<Field>(20);
|
||||||
protected final HashMap<Buffer,Field> _bufferMap = new HashMap<Buffer,Field>(32);
|
protected final HashMap<Buffer,Field> _bufferMap = new HashMap<Buffer,Field>(32);
|
||||||
protected int _revision;
|
protected int _revision;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
|
@ -369,7 +369,7 @@ public class HttpFieldsTest extends TestCase
|
||||||
|
|
||||||
fields.clear();
|
fields.clear();
|
||||||
fields.addSetCookie("everything","value","domain","path",0,"comment",true,true,0);
|
fields.addSetCookie("everything","value","domain","path",0,"comment",true,true,0);
|
||||||
assertEquals("everything=value;Path=path;Domain=domain;Expires=Thu, 01 Jan 1970 00:00:00 GMT;Secure;HttpOnly",fields.getStringField("Set-Cookie"));
|
assertEquals("everything=value;Path=path;Domain=domain;Expires=Thu, 01-Jan-1970 00:00:00 GMT;Secure;HttpOnly",fields.getStringField("Set-Cookie"));
|
||||||
|
|
||||||
fields.clear();
|
fields.clear();
|
||||||
fields.addSetCookie("ev erything","va lue","do main","pa th",1,"co mment",true,true,2);
|
fields.addSetCookie("ev erything","va lue","do main","pa th",1,"co mment",true,true,2);
|
||||||
|
|
Loading…
Reference in New Issue