Hello,
I’ve been forced to develop a system that works on a low level with http
headers and ajax requests, and unfortunately the Firefox Dev Tools haven’t
helped.
I would like to comment the workflow and problems that I have found, in
order for you to determine whether it should be treated.
Background:
The objective was to develop a system in which some requests ajax are
launched from one domain to another one and those requests should also
include basic authentication.
Much of the work has been to configure the headers that Apache must send in
order to get this done.
Concerning the Firefox Nightly Devs Tools, they are not displaying all the
information, and that information not displayed was essential.
The user story was as follows:
>From a
http://origin.int domain, we must get from the domain
http://crossdomain.int a resource protected with user and password (Basic
authorization).
The javascritpt code managing that was:
var xhr = new XMLHttpRequest();
xhr.open("GET", "
http://crossdomain.int", true);
xhr.withCredentials = true;
xhr.setRequestHeader("Authorization", 'Basic ' +
btoa('user:pasword'));
xhr.onload = function () {
// Do anything
};
xhr.send();
The problems I've seen in Firefox and I've had to use Chromium is that in
Firefox on the network panel does not appear all generated traffic and when
that hidden traffic generates errors in the console, they are displayed
decontextualized shown and it seems really confusing to see that no traffic
is displayed but errors, for example crossdomain error type.
To resume, when that code “xhr.send()” is executed in Chromium, first an
OPTIONS request is launched with, an only headers negotiation, and if
everything went well a second request is launched, this time GET, in which
the Authorization is already processed and there is a content response. So,
Chromium appears in *2 requests*.
Request URL:
http://validar.crossdomaint.int/resource.css
Request Method:
OPTIONS
Status Code:
200 OK
Remote Address:
192.168.0.211:80
and the second one:
Request URL:
http://validar.crossdomaint.int/resource.css
Request Method:
GET
Status Code:
200 OK
Remote Address:
192.168.0.211:80
En Firefox *only* appears the GET request
--
-=stripTM=-
http://mozilla-hispano.org
http://twitter.com/striptm