Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there a server-side limit on the length of a URL?

My Java Servlet is making use of the Facebook Graph API via the URLFetchService.fetch(HTTPRequest request) method. This had been working fine for weeks but today the length of the query I was testing was much longer than previous ones - approximately 2300 chars in length. This query resulted in a MalformedURLException : Invalid URL error being thrown.

Two hours later, I found out that the root cause was the fact that the App Engine has a hard limit on the length of a URL that is being fetched (i.e. from your GAE app to somewhere else on the web). Furthermore, this issue only manifests itself on the production server so you won't be aware of it until you've gone live.

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

Question(s): Will this be 'fixed'? Is there a simple solution?

Environment Setup: Java App Engine SDK 1.6.1

like image 686
Yohannes Tadesse Avatar asked Mar 02 '12 08:03

Yohannes Tadesse


1 Answers

It sounds like you need to file this as a feature request or bug report, however you see it. In either case, the good folks on the App Engine team are the only ones who can resolve this for you.

like image 104
Marvin Pinto Avatar answered Oct 10 '22 09:10

Marvin Pinto