This is new behavior I haven't seen before and have serveral apps
running with javascript on gae that dont display this symptom.  The
symptom only occurs only on new deployment, not locally.  A brief
summary is in this thread.

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

Basically any file I'm loading via a file system or network io read
seems to have the backslash character in strings again escaped.  so "a
\nb" becomes "a\\nb" which meas that rendering string to the response
body results in

a\nb

instead of

a
b

More importantly it causes RegExp constructor to fail tests because
escaped characters are double escaped, eg
RegExp("\\w+") becomes RegExp("\\\\w+").

Finally the simpliest test comes from loading a very small file into
rhino (this is js.jar not built-in rhino for java 1.6).
Here is the file:

print('what is the length of two back slash: '+'\\'.length);

Locally, the dev server, does as expected and I get a message:
what is the length of two back slash: 1

on GAE I get firm evidence that the string has been modified:
what is the length of two back slash: 2

Can anyone think what I might have done to trigger this behavior
myself?  Is there some sort of security mechanism at work here to
prevent string injection?  Is it possible that its a GZIP issue on
GAE?  Any help would be greatly appreciated as my apps will no longer
deploy but the existing versions are working correctly.

Thanks
Thatcher

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to