Reputation: 1536
When I post base64 string over 1.2 mb apache tomcat giving the error: "The request sent by the client was syntactically incorrect" When it is under 1.2 mb it works fine, I receive the data at the server side.
Is there size restriction and how am I going to past this issue? Any help will be appreciated.
Thanks a lot :)
$.ajax({ type: 'POST',
url: 'http://localhost/testServer/image',
data: {imageData : result} ,
async: true,
success: function(data) {
},
error: function (xhr, textStatus, errorThrown) {
alert(xhr.responseText);
}
});
Upvotes: 1
Views: 594
Reputation: 4885
The HTTP specification doesn't impose a specific size limit for posts. They will usually be limited by either the web server or the programming technology used to process the submission.
In httpd.conf add this line
LimitRequestBody<filesize>
LimitRequestBody Directive specifies the number of bytes from 0 (meaning unlimited) to >2147483647 (2GB) that are allowed in a request body
For more information,please refer the URL:
http://httpd.apache.org/docs/mod/core.html#limitrequestbody
Source: here
Upvotes: 2