You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lenny Primak <lp...@hope.nyc.ny.us> on 2011/10/23 15:46:14 UTC

Cache control in production mode in 1970?

This date at least makes Safari not cache any javascript in production mode.

------------------------------------------------
GET /tap/assets/25b85eccaed0/stack/en/core-datefield.js HTTP/1.0

HTTP/1.1 200 OK
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.1 Java/Apple Inc./1.6)
Server: GlassFish Server Open Source Edition 3.1.1
Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
Expires: Sun, 30 Dec 1979 00:00:00 GMT
Content-Type: text/javascript
Content-Length: 13308
Date: Sun, 23 Oct 2011 13:43:58 GMT
Connection: close

function DatePicker(a){if(arguments.length==0){this._selectedDate=null;this._calendarDate=new Date;this._selectedInited=false}else{this._selectedDate=a;if(!a){this._calendarDate=new Date}else{this._calendarDate=new Date(a)}this._selectedInited=true}this._matrix=[[],[],[],[],[],[],[]];this._showNone=true;this._showToday=true;this._firstWeekDay=0;this._redWeekDay=6}DatePicker.months=["January","February","March","April","May","June","July","August"

etc etc
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Cache control in production mode in 1970?

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
There is a related JIRA: https://issues.apache.org/jira/browse/TAP5-1119
I don't think they discuss the root of the problem, which looks like
org/apache/tapestry5/internal/services/assets/StackAssetRequestHandler.java, line 183.

On Oct 23, 2011, at 3:56 PM, Lenny Primak wrote:

> This looks like a bug.
> 
> tapestry5/internal/services/ResourceStreamerImpl.java, line 102
> long lastModified = streamable.getLastModified();
> looks like that returns zero (1970) and expired header is set later
> to (+10 years) to 1979.
> 
> I think a null check should be made there or at least see why its returning null.
> There maybe a deeper problem there.
> 
> On Oct 23, 2011, at 3:31 PM, Lenny Primak wrote:
> 
>> I don't understand your point Steve. I would think the proper expiration header would be sometime in the future and not a null value?  Seems like either a bug in tapestry or the app server to me. 
>> 
>> 
>> 
>> On Oct 23, 2011, at 9:57 AM, Steve Eynon <st...@alienfactory.co.uk> wrote:
>> 
>>> Yep, no surprise there. That would be a Java limitation since JDK 1.0:
>>> 
>>> http://download.oracle.com/javase/7/docs/api/java/sql/Date.html
>>> 
>>> Steve.
>>> 
>>> 
>>> 
>>> On 23 October 2011 21:46, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
>>>> This date at least makes Safari not cache any javascript in production mode.
>>>> 
>>>> ------------------------------------------------
>>>> GET /tap/assets/25b85eccaed0/stack/en/core-datefield.js HTTP/1.0
>>>> 
>>>> HTTP/1.1 200 OK
>>>> X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.1 Java/Apple Inc./1.6)
>>>> Server: GlassFish Server Open Source Edition 3.1.1
>>>> Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
>>>> Expires: Sun, 30 Dec 1979 00:00:00 GMT
>>>> Content-Type: text/javascript
>>>> Content-Length: 13308
>>>> Date: Sun, 23 Oct 2011 13:43:58 GMT
>>>> Connection: close
>>>> 
>>>> function DatePicker(a){if(arguments.length==0){this._selectedDate=null;this._calendarDate=new Date;this._selectedInited=false}else{this._selectedDate=a;if(!a){this._calendarDate=new Date}else{this._calendarDate=new Date(a)}this._selectedInited=true}this._matrix=[[],[],[],[],[],[],[]];this._showNone=true;this._showToday=true;this._firstWeekDay=0;this._redWeekDay=6}DatePicker.months=["January","February","March","April","May","June","July","August"
>>>> 
>>>> etc etc
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>> 
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Cache control in production mode in 1970?

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
This looks like a bug.

tapestry5/internal/services/ResourceStreamerImpl.java, line 102
long lastModified = streamable.getLastModified();
looks like that returns zero (1970) and expired header is set later
to (+10 years) to 1979.

I think a null check should be made there or at least see why its returning null.
There maybe a deeper problem there.

On Oct 23, 2011, at 3:31 PM, Lenny Primak wrote:

> I don't understand your point Steve. I would think the proper expiration header would be sometime in the future and not a null value?  Seems like either a bug in tapestry or the app server to me. 
> 
> 
> 
> On Oct 23, 2011, at 9:57 AM, Steve Eynon <st...@alienfactory.co.uk> wrote:
> 
>> Yep, no surprise there. That would be a Java limitation since JDK 1.0:
>> 
>> http://download.oracle.com/javase/7/docs/api/java/sql/Date.html
>> 
>> Steve.
>> 
>> 
>> 
>> On 23 October 2011 21:46, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
>>> This date at least makes Safari not cache any javascript in production mode.
>>> 
>>> ------------------------------------------------
>>> GET /tap/assets/25b85eccaed0/stack/en/core-datefield.js HTTP/1.0
>>> 
>>> HTTP/1.1 200 OK
>>> X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.1 Java/Apple Inc./1.6)
>>> Server: GlassFish Server Open Source Edition 3.1.1
>>> Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
>>> Expires: Sun, 30 Dec 1979 00:00:00 GMT
>>> Content-Type: text/javascript
>>> Content-Length: 13308
>>> Date: Sun, 23 Oct 2011 13:43:58 GMT
>>> Connection: close
>>> 
>>> function DatePicker(a){if(arguments.length==0){this._selectedDate=null;this._calendarDate=new Date;this._selectedInited=false}else{this._selectedDate=a;if(!a){this._calendarDate=new Date}else{this._calendarDate=new Date(a)}this._selectedInited=true}this._matrix=[[],[],[],[],[],[],[]];this._showNone=true;this._showToday=true;this._firstWeekDay=0;this._redWeekDay=6}DatePicker.months=["January","February","March","April","May","June","July","August"
>>> 
>>> etc etc
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Cache control in production mode in 1970?

Posted by Lenny Primak <lp...@hope.nyc.ny.us>.
I don't understand your point Steve. I would think the proper expiration header would be sometime in the future and not a null value?  Seems like either a bug in tapestry or the app server to me. 



On Oct 23, 2011, at 9:57 AM, Steve Eynon <st...@alienfactory.co.uk> wrote:

> Yep, no surprise there. That would be a Java limitation since JDK 1.0:
> 
> http://download.oracle.com/javase/7/docs/api/java/sql/Date.html
> 
> Steve.
> 
> 
> 
> On 23 October 2011 21:46, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
>> This date at least makes Safari not cache any javascript in production mode.
>> 
>> ------------------------------------------------
>> GET /tap/assets/25b85eccaed0/stack/en/core-datefield.js HTTP/1.0
>> 
>> HTTP/1.1 200 OK
>> X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.1 Java/Apple Inc./1.6)
>> Server: GlassFish Server Open Source Edition 3.1.1
>> Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
>> Expires: Sun, 30 Dec 1979 00:00:00 GMT
>> Content-Type: text/javascript
>> Content-Length: 13308
>> Date: Sun, 23 Oct 2011 13:43:58 GMT
>> Connection: close
>> 
>> function DatePicker(a){if(arguments.length==0){this._selectedDate=null;this._calendarDate=new Date;this._selectedInited=false}else{this._selectedDate=a;if(!a){this._calendarDate=new Date}else{this._calendarDate=new Date(a)}this._selectedInited=true}this._matrix=[[],[],[],[],[],[],[]];this._showNone=true;this._showToday=true;this._firstWeekDay=0;this._redWeekDay=6}DatePicker.months=["January","February","March","April","May","June","July","August"
>> 
>> etc etc
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Cache control in production mode in 1970?

Posted by Steve Eynon <st...@alienfactory.co.uk>.
Yep, no surprise there. That would be a Java limitation since JDK 1.0:

http://download.oracle.com/javase/7/docs/api/java/sql/Date.html

Steve.



On 23 October 2011 21:46, Lenny Primak <lp...@hope.nyc.ny.us> wrote:
> This date at least makes Safari not cache any javascript in production mode.
>
> ------------------------------------------------
> GET /tap/assets/25b85eccaed0/stack/en/core-datefield.js HTTP/1.0
>
> HTTP/1.1 200 OK
> X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.1 Java/Apple Inc./1.6)
> Server: GlassFish Server Open Source Edition 3.1.1
> Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
> Expires: Sun, 30 Dec 1979 00:00:00 GMT
> Content-Type: text/javascript
> Content-Length: 13308
> Date: Sun, 23 Oct 2011 13:43:58 GMT
> Connection: close
>
> function DatePicker(a){if(arguments.length==0){this._selectedDate=null;this._calendarDate=new Date;this._selectedInited=false}else{this._selectedDate=a;if(!a){this._calendarDate=new Date}else{this._calendarDate=new Date(a)}this._selectedInited=true}this._matrix=[[],[],[],[],[],[],[]];this._showNone=true;this._showToday=true;this._firstWeekDay=0;this._redWeekDay=6}DatePicker.months=["January","February","March","April","May","June","July","August"
>
> etc etc
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org