Search code examples
jquerypostxmlhttprequestlarge-data

Why I get 403, when doing an XHR POST with all the html content of a page? IT's on the same domain


When doing $.post('actions.php',{ content: 'xxxxxxxxxxxx' }, function(data){});

It works i get 200 OK.

But when doing:

$.post('actions.php',{ content: escape($('body').html()) }, function(data){});

I get 403, error FORBIDDEN.

Any idea why? It's on the same domain, so i'm not violating SOP.


Solution

  • Post size may be an issue for this.

    You can go through your server error logs and you can figure out the reason.

    for error logs http://www.cyberciti.biz/faq/apache-logs/