2

jQuery.ajax()関数がローカル サーバーで完全に動作するのに、アップロードすると Firebug で「中止」応答が返されるのはなぜですか?

ここに画像の説明を入力

ajax 関数は同じドメインを呼び出しており、次のようになります。

jQuery.ajax({
  url: homeUrl+'/engine/check/',
  data: jQuery('#post').serialize(),
  type: 'post',
  beforeSend:function(){
    jQuery('#checker span').text('checking status...').parent().show();
  },
  success: function(data){
    if(data == 'not_gallery'){
      jQuery('#checker').hide();
    }

    if(data == 'no_folder'){
      jQuery('#loader').hide();
      jQuery('#checker span').html('please ensure you have chosen a folder to connect to this gallery');
    }

    if(data == 'complete'){
      jQuery('#loader').hide();
      jQuery('#checker span').html('Gallery Active');
    }

    if(data == 'in_crunch'){
      jQuery('#loader').show();
      jQuery('#checker span').html('Crunching in progress. This may take a while...');
      refreshIntervalId = setInterval( 'check_poll()', 15000 );
    }

    if(data == 'init_crunch'){
      jQuery('#loader').show();
      jQuery('#checker span').html('Crunching in progress. This may take a while...');
      jQuery.post(homeUrl+'/engine/crunch/', jQuery('#post').serialize(), function(data){
        if(data == 'done'){
          jQuery('#loader').hide();
          jQuery('#checker span').html('Gallery Active');
        }                                                                                     
      });
    }
  }
});

ネストされた ajax 関数でしょうか?

4

1 に答える 1

0

この問題に直面した例では、Apache Web サーバーの構成が原因でした。

サーバーは x mb のデータを受け入れるように構成されており、私のペイロードは x を超えていました。

発生している場合は、アクセスログを確認してください。

この場合、firebug は「中止」と表示され、chrome 開発者ツールは POST リクエストで「保留中」と表示されていました。

于 2013-11-25T03:37:38.417 に答える