[google-appengine] Re: Max-age less than specified in app.yaml

2008-11-15 Thread Anders

Yes you are right, the documentation says: Patterns are evaluated in
the order they appear in the app.yaml, from top to bottom. The first
mapping whose pattern matches the URL is the one used to handle the
request.

http://code.google.com/appengine/docs/configuringanapp.html

I also made a mistake in the declaration where static_dir: static
should be static_dir: static/images

On Nov 15, 5:08 am, David Symonds [EMAIL PROTECTED] wrote:
 On Sat, Nov 15, 2008 at 2:03 PM, Anders [EMAIL PROTECTED] wrote:
  - url: /static
   static_dir: static

  - url: /static/images
   static_dir: static
   expiration: 1d

 Try swapping the order of these two. I believe they are scanned in
 order, and the first match is used.

 Dave.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Max-age less than specified in app.yaml

2008-11-14 Thread Jesaja Everling
Hello Anders,

maybe this thread helps?

http://groups.google.com/group/google-appengine/browse_thread/thread/bcdacfaac673181a

Best Regards,

Jesaja Everling

2008/11/14 Anders [EMAIL PROTECTED]:

 When the expiration attribute is set in the app.yaml file then the
 Cache-Control header still has a max age of 600 seconds.

 For example expiration 1 day in app.yaml:

 - url: /static/images
  static_dir: static
  expiration: 1d

 Will result in the response:

 Date: Fri, 14 Nov 2008 07:25:34 GMT
 Expires: Fri, 14 Nov 2008 07:35:34 GMT
 Cache-Control: public, max-age=600
 Content-Type: image/gif
 Server: Google Frontend
 Content-Length: 760
 Connection: Close

 Shouldn't the correct max-age for Cache-Control in this case be 86400
 (number of seconds in 1 day)?
 




-- 
o
L_/
OL
This is Schäuble. Copy Schäuble into your signature to help him on his
way to Überwachungsstaat.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Max-age less than specified in app.yaml

2008-11-14 Thread Marzia Niccolai
Hi Anders,

This is strange, because it should set *both* the Expires and the
Cache-Control header to be 1 day, and both are wrong.

I attempted to replicate this on one of my applications, but so far have not
been able to (for me it's setting both headers correctly).

Could you send along your complete app.yaml file and the specific URL on
which you are seeing this issue?

Thanks,
Marzia

On Thu, Nov 13, 2008 at 11:38 PM, Anders [EMAIL PROTECTED] wrote:


 When the expiration attribute is set in the app.yaml file then the
 Cache-Control header still has a max age of 600 seconds.

 For example expiration 1 day in app.yaml:

 - url: /static/images
  static_dir: static
  expiration: 1d

 Will result in the response:

 Date: Fri, 14 Nov 2008 07:25:34 GMT
 Expires: Fri, 14 Nov 2008 07:35:34 GMT
 Cache-Control: public, max-age=600
 Content-Type: image/gif
 Server: Google Frontend
 Content-Length: 760
 Connection: Close

 Shouldn't the correct max-age for Cache-Control in this case be 86400
 (number of seconds in 1 day)?
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Max-age less than specified in app.yaml

2008-11-14 Thread David Symonds

On Sat, Nov 15, 2008 at 2:03 PM, Anders [EMAIL PROTECTED] wrote:

 - url: /static
  static_dir: static

 - url: /static/images
  static_dir: static
  expiration: 1d

Try swapping the order of these two. I believe they are scanned in
order, and the first match is used.


Dave.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Max-age less than specified in app.yaml

2008-11-14 Thread Anders

Hi Jesaja,

The thread you posted talks about a bug about expiration not working
in the SDK, but I guess it will work in the Google App Engine since it
worked for Marzia. I will try to put the images in a separate
directory instead of as a subdirectory in under /static, something
like:

- url: /images
  static_dir: static
  expiration: 1d

- url: /static
  static_dir: static


On Nov 14, 4:50 pm, Jesaja Everling [EMAIL PROTECTED] wrote:
 Hello Anders,

 maybe this thread helps?

 http://groups.google.com/group/google-appengine/browse_thread/thread/...

 Best Regards,

 Jesaja Everling

 2008/11/14 Anders [EMAIL PROTECTED]:





  When the expiration attribute is set in the app.yaml file then the
  Cache-Control header still has a max age of 600 seconds.

  For example expiration 1 day in app.yaml:

  - url: /static/images
   static_dir: static
   expiration: 1d

  Will result in the response:

  Date: Fri, 14 Nov 2008 07:25:34 GMT
  Expires: Fri, 14 Nov 2008 07:35:34 GMT
  Cache-Control: public, max-age=600
  Content-Type: image/gif
  Server: Google Frontend
  Content-Length: 760
  Connection: Close

  Shouldn't the correct max-age for Cache-Control in this case be 86400
  (number of seconds in 1 day)?

 --
 o
 L_/
 OL
 This is Schäuble. Copy Schäuble into your signature to help him on his
 way to Überwachungsstaat.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Max-age less than specified in app.yaml

2008-11-14 Thread Anders

Now I have changed it to:

- url: /images
  static_dir: static/images
  expiration: 1d

- url: /static
  static_dir: static

Which works fine.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---