Project

General

Profile

Actions

Feature #50509

closed

Switch to jsonbody if AJAX-Call exceeds length limit

Added by Stefan Froemken over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
-
Start date:
2013-07-29
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
easy
Sprint Focus:

Description

Hello Core-Team,

I have programmed an extension on my local machine and everything works like expected. Then I push my extension to live and all AJAX-Calls to ajax.php returns an Error 500. I can activate all debugging informations in Installtool, but there is still this Error. No further informations available. So I started step-by-step debugging in Source.

The error appears at this line:

header('X-JSON: '.($this->contentFormat != 'jsonbody' ? $content : TRUE));

Maybe this part is OK for very small AJAX-Calls. But in my case I retrieve data for a table and I think the size of my JSON is too large for header. I found some information about it here:

https://www.ruby-forum.com/topic/94728
http://www.sencha.com/forum/archive/index.php/t-4352.html
http://stackoverflow.com/questions/1097651/is-there-a-practical-http-header-length-limit

For now I have change contentType from "json" to "jsonbody" and my table works again on live system:

$ref->setContentFormat('jsonbody');

In my kind of view you should deactive putting data into the header.

Stefan

Actions

Also available in: Atom PDF