views:

42

answers:

1

This is with reference to following question..

http://stackoverflow.com/questions/1428431/switch-off-case-sensitive-urls-in-google-app-engine

I am trying to use appengine as CDN. There is a lot of code written where javascript and css is being accessed in pages without considering case sensitivity. My App file looks like below..

 handlers:
- url: /themes/([^A-Z]+)
  static_files: themes/\1
  upload: themes/.*
- url: /.*
  handler: tolowercase.py

The problem is I want to make even themes as case insensitive. So what should be modification in tolowercase.py?

Also I didn't understand the first solution as I don't know about adding middleware in appengine (pardon my ignorance here)

+1  A: 

There's no way to serve static files with different capitalization than they were uploaded with - you'd need to upload them as app data instead, and serve them through your app.

Fixing your app to use the correct capitalization everywhere would be a much better idea.

Nick Johnson
any pointers to this suggested approach would really help.
Pradeep Kumar Mishra
I'm not quite sure what sort of pointers you want - simply go through your app, find all references to static files, and make sure they match the capitalization of the actual filename.
Nick Johnson
it's about "you'd need to upload them as app data instead, and serve them through your app"..but any way thanks for your help..I will figure it out.
Pradeep Kumar Mishra
You really don't want to do this unless you have no other option. It'll be slower, and it'll consume more resources to do so.
Nick Johnson