0

What is the maximum length of the url argument for App Engine's createLogoutURL(url) function in Java?

We are getting this Exception:

java.lang.IllegalArgumentException: URL too long
at com.google.appengine.api.users.UserServiceImpl.makeSyncCall(UserServiceImpl.java:126)
    at com.google.appengine.api.users.UserServiceImpl.createLogoutURL(UserServiceImpl.java:77)
    at com.google.appengine.api.users.UserServiceImpl.createLogoutURL(UserServiceImpl.java:67)

There's no doc on the limit, and we cannot find the code that throws the REDIRECT_URL_TOO_LONG error in ApiProxy https://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/apphosting/api/ApiProxy.java#58 called by UserServiceImpl https://code.google.com/p/googleappengine/source/browse/trunk/java/src/main/com/google/appengine/api/users/UserServiceImpl.java?r=173#114

Carter Maslan
  • 493
  • 4
  • 11
  • http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers – Lipis Jan 20 '14 at 21:55

1 Answers1

1

I'm not exactly sure how big is the actual size to get your particular error, but it looks like the maximum size that Google App Engine supports (and most likely all of the Google services) is 2044 characters for the path part (or around that number). I found it using binary search because recently I saw this message cause my query was tooo big.

The following URL is being processed normally and it returns the 404 of the app but if you add one more character to it you'll see Google's 414 error:

So your redirected URL shouldn't be more than 2000 characters because it won't be processed anyway.

Lipis
  • 21,388
  • 20
  • 94
  • 121