Why is there a server side URL length limit?

My Java servlet uses the Facebook API via the URLFetchService.fetch(HTTPRequest request) method. This worked fine for several weeks, but today the length of the request I tested was much longer than the previous ones - about 2300 characters in length. This request resulted in a MalformedURLException : Invalid URL error.

Two hours later, I found out that the main reason was that App Engine has a hard limit on the length of the URL that is retrieved (i.e. from your GAE application to another place on the Internet). In addition, this problem only appears on the production server, so you won’t know about it until you go live.

Why is this so? I mean, with the proliferation of JSON and REST services, I can foresee many more people making requests that will be longer than the current maximum length, as they make different API calls for different services.

Question (s) : Will this be β€œfixed”? Is there a simple solution?

Environment setup: Java App Engine SDK 1.6.1

+6
source share
1 answer

It sounds like you need to write this as a function request or report an error, but you see it. In any case, the good people on the App Engine team are the only ones who can solve this for you.

+1
source

Source: https://habr.com/ru/post/909808/


All Articles