aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes 10.4.14 413 Request Entity Too Large Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "10.4.14 413 Request Entity Too Large" Watch "10.4.14 413 Request Entity Too Large" New topic
Author

10.4.14 413 Request Entity Too Large

Adrien Ruffie
Ranch Hand

Joined: Jan 14, 2009
Posts: 90
Hello all,

I try to my webapp to transfer a file over a remote server, but I get the following error:

org.restlet.resource.ResourceException: Request Entity Too Large
at org.restlet.resource.ClientResource.handle(ClientResource.java:858) ~[org.restlet-2.0.8.jar:na]
at org.restlet.resource.ClientResource.post(ClientResource.java:1197) ~[org.restlet-2.0.8.jar:na]




I use restlet but I investigate the problem and it seems to be due to the following problem:

10.4.14 413 Request Entity Too Large

The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request.

If the condition is temporary, the server SHOULD include a Retry- After header field to indicate that it is temporary and after what time the client MAY try again.

Any one have an idea of the problem ?

Great thank and best regards

Adrien RuffiƩ

SCJP 5, SCDJWS 5
http://adrien-ruffie.blogspot.com
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

The message seems self-explanatory to me -- the data you are sending is larger than what the server will accept. If you want to investigate, there are two numbers you need to know: The maximum size of the request that URL will accept, and the size of the request you are sending.
Adrien Ruffie
Ranch Hand

Joined: Jan 14, 2009
Posts: 90
Do you have an idea if tomcat can limite the size ? Because the send of my file is correctly launch like:

with restlet:

System.out.println("Begin sending");
resource.post(entity);
System.out.println("Ending sending");

But the "Ending sending" is not logged, and on my server I check the file and the size is only just of 4ko ... instead 54ko

Tomcat can break the uploading to 4ko ?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

I wouldn't start by looking at Tomcat -- the server in question would be some web application which is receiving those restlets. I would look there. If it's somebody else's server then asking them might be quicker than doing research.
Adrien Ruffie
Ranch Hand

Joined: Jan 14, 2009
Posts: 90
The problem is somebody else's server aren't enough competent to check the problem ... I think Tomcat chunck the request 4k by 4k and when the first 4k frame/weft was recevieded,
I think a response of the first received frame/weft was sent but not received by my first webapp where the sending beging ...

Do you think I'm right ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 10.4.14 413 Request Entity Too Large