Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Èròjà atẹ̀lélànà yii ni a ti fi pamọ́ fọ́jọ́ pípẹ́. Jọ̀wọ́ béèrè ìbéèrè titun bí o bá nílò ìrànwọ́.

My site try to post a large ajax request to server, the request is rejected. Tested the same scenario in IE and Chrome, and both of them working.

  • 1 èsì
  • 1 ní ìṣòro yìí
  • 14 views
  • Èsì tí ó kẹ́hìn lọ́wọ́ philipp

more options

In my site, I had a button that will trigger a Ajax post to my server. When my data is with the content-length "32109", the post will rejected with a empty body response with xhr.statusText "error". If my content-length is "27549", i'm able to post successfully to my server.

Tested the same scenario in IE and Chrome and both working fine with content-length "32109".

Code:


$.ajax({

           url: "update",
           dataType: "json",
           data: {
               parameter_data: JSON.stringify({
                   meta_datas: metaDataObj,
                   attributesValues: this.data
               })
           },
           type: "POST",
           success: function(data) {
               ...
           },
           error: function (xhr, desc, err) {
               ...
           }
       });


Request headers:


User-Agent:"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0" Accept:"application/json, text/javascript, */*; q=0.01" Accept-Language:"en,zh;q=0.8,sq;q=0.6,zh-TW;q=0.4,en-US;q=0.2" Accept-Encoding:"gzip, deflate" Content-Type:"application/x-www-form-urlencoded; charset=UTF-8" X-Requested-With:"XMLHttpRequest" Content-Length:"32109" Connection:"keep-alive" Pragma:"no-cache" Cache-Control:"no-cache"

The response body is empty.

xhr:

- state = rejected
- statusText = error

May i know why the request is rejected? Note: The request never reach the server

In my site, I had a button that will trigger a Ajax post to my server. When my data is with the content-length "32109", the post will rejected with a empty body response with xhr.statusText "error". If my content-length is "27549", i'm able to post successfully to my server. Tested the same scenario in IE and Chrome and both working fine with content-length "32109". Code: --------------------------------------------------------------------------------------------------------------------------------------- $.ajax({ url: "update", dataType: "json", data: { parameter_data: JSON.stringify({ meta_datas: metaDataObj, attributesValues: this.data }) }, type: "POST", success: function(data) { ... }, error: function (xhr, desc, err) { ... } }); Request headers: --------------------------------------------------------------------------------------------------------------------------------------- User-Agent:"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0" Accept:"application/json, text/javascript, */*; q=0.01" Accept-Language:"en,zh;q=0.8,sq;q=0.6,zh-TW;q=0.4,en-US;q=0.2" Accept-Encoding:"gzip, deflate" Content-Type:"application/x-www-form-urlencoded; charset=UTF-8" X-Requested-With:"XMLHttpRequest" Content-Length:"32109" Connection:"keep-alive" Pragma:"no-cache" Cache-Control:"no-cache" The response body is empty. xhr: - state = rejected - statusText = error May i know why the request is rejected? Note: The request never reach the server
Ìsopọ̀ yíyà aṣàfihàn

All Replies (1)

more options

hi, support.mozilla.org is intended for end-user support. if you have a question regarding web development please refer to Where to go for developer support instead. thank you for your understanding!