1

I'm currently writing a java program that reads tab-delimited text files via http. This is what I do:

String urlString = http://www.uniprot.org/mapping/?from=BIOGRID_ID&to=ACC&format=tab&query=1194477,116761,.....
BufferedReader reader = new BufferedReader(new InputStreamReader(new URL(urlString).openStream()));

Usually this works for me, but now I get

java.io.IOException: Server returned HTTP response code: 414 for URL: http://...

which means the URL is too long. Is there a solution other than sending multiple smaller requests?

user1775213
  • 491
  • 1
  • 6
  • 11

1 Answers1

1

HTTP Error 414 means that web server thinks that the HTTP data stream sent by the client contains a URL that is simply too large i.e. too many bytes.

If you're using Apache you can change the LimitRequestLine directive value to change the data stream URL length. For more details check this : How do I resolve a HTTP 414 "Request URI too long" error?

Community
  • 1
  • 1
Abhi
  • 341
  • 7
  • 15