Saturday, April 11, 2009

Google AppEngine (GAE) is case sensitive and my XP is not

I was just about to post the following "complaint"/request for help to the google appengine newsgroup:

I created a GAE application using python.
well - that might be an overstatement, as this app is just a plain static html/js/css website.

It took a while to get it running on my dev environment but finally it does work.

I executed the update script and it seems to run o.k.

D:\DVLP\Dozi>"C:\program Files\Google\google_appengine/" update d:\dvlp\dozi
Scanning files on local disk.
Initiating update.
Cloning 111 static files.
Cloned 100 files.
Cloning 12 application files.
Uploading 2 files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.

and I even see it on my console as uploaded.

BUT - when i try to go to any of

which to my understanding should all lead to a working version of this site I only get a page saying
"Oops! This link appears broken." (404)

if i try accessing an image on this site:
it is properly served.

my app.yaml looks like this:

No, you are not missing the end.
it was at that point that I said to myself - well, if it servers the image - why wont it serve the .htm ??

the app.yaml looks like this:

application: dozi-arch
version: 2
runtime: python
api_version: 1

default_expiration: "1m"

- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
- ^(.*/)?.*\.bak$
- ^(.*/)?.*\.sln$
- ^(.*/)?.*\.suo$
- ^(.*/)?.*\.txt$
- ^(.*/)?.*\.bat$
- ^(.*/)?Thumbs.db$

- url: /
static_files: static/default.htm
upload: static/default.htm

# All URLs beginning with /img are treated as paths to static files in
# the img/ directory. Note that static_dir handlers do not use a
# regular expression for the URL pattern, only a prefix.

- url: /(.*)
static_files: static/\1
upload: static/(.*)

so why won't it serve default.htm when I go to the root of my site ?

well as it turns out - it because the file is locally stored as Default.htm not default.htm - when running on my pc the filesystem does not care for case and serves it even when asked for default.htm.

changed app.yaml to say:

- url: /
static_files: static/Default.htm
upload: static/Default.htm

and ....

b.t.w -
does anyone know how can i server a url such asשם_בעברית.htm
as a file from GAE ?! (for the non-hebrew-speakers among you - the file name just say "a name in hebrew".

well - maybe when i have another free night to bang my head against the GAE.

Clicky Web Analytics