PHP - No HTTP_X_REQUESTED_WITH/X-Requested-With header given for ajax requests

337 views
Skip to first unread message

Paul Canning

unread,
Oct 20, 2015, 11:01:56 AM10/20/15
to Google App Engine
I am making various AJAX requests from a HTML5 web-app to my PHP application (CodeIgniter) on GAE (PHP), and I am not seeing the HTTP_X_REQUESTED_WITH/X-Requested-With header in the headers.

In a slightly related issue, I am also not getting the Content-Length headers from GAE (PHP).

Nick (Cloud Platform Support)

unread,
Oct 20, 2015, 2:06:44 PM10/20/15
to Google App Engine
Hey Paul,

As you could tell from browsing other similar threads, this forum isn't the right place to look for specific issue technical support. You should post this issue to either stackoverflow or the public issue tracker for App Engine, and there you'll be in the right place for people to help. This forum is meant for more general discussion among the developer community of the platform and services. When you make your post to stackoverlow or the public issue tracker, I suggest you include information like the following, to allow people to better understand what's happening:

* your JS code which triggers the request
* a sample request
* a sample response
* your thoughts on why this might be happening
* what you've done or checked to attempt to understand/fix it

Merely stating that an issue is occurring using the most immediately-available information isn't usually a good way to ask for help, since it gives very little for others to work with, except in the case that this superficial information is enough to look up a solution, in which case you could have done it yourself just as well as the person who is trying to help.

Kaan Soral

unread,
Oct 20, 2015, 3:09:42 PM10/20/15
to Google App Engine
Are you checking all the headers by the way?

Usually the naming of headers change, but with Python, looking at all the headers is a good way to spot a wanted header

I don't know what kind of a framework PHP has, but as far as I remember, the Python one (webapp) used to strip some headers during handling, they could be reached through a deeper access, but my recollection is hazy

Paul Canning

unread,
Oct 21, 2015, 5:41:21 AM10/21/15
to Google App Engine
Yes, I checked all headers, using Chrome Inspector, POSTMan and using my PHP app to spit them out in JSON format.
Reply all
Reply to author
Forward
0 new messages