[jQuery] Ajax request Error - please help

2008-10-09 Thread debussy007


Hi,

In localhost, all of my ajax request work perfectly,
but on the prod server, whenever I try to make an ajax request, the
following error appear:

(This is the code used to display the error:
error: function(xhr, status, ex) {
var msg = "Error ajax edit profile :\n\n";
msg += "RESPONSE TEXT :\n";
msg += xhr.responseText + "\n\n";
msg += "STATUS :\n";
msg += status + "\n";
msg += xhr.status + "\n\n";
msg += "EXCEPTION :\n";
msg += ex;
alert(msg);
},
)

Error ajax edit profile :

RESPONSE TEXT :
http://www.w3.org/TR/html4/loose.dtd";>

ERROR: The requested URL could not be retrieved


ERROR
The requested URL could not be retrieved


While trying to process the request:

POST /public/xxx/tree/get-computer-by-a/a/A782 HTTP/1.0
Host: xyz.belfla.be

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.3)
Gecko/2008092417 Firefox/3.0.3

Accept: application/json, text/javascript, */*

Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: identity,gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

X-Requested-With: XMLHttpRequest

Referer: http://xyz.belfla.be/public/xxx/auth/login

Cookie: PHPSESSID=sjaj2sb252kcqm3th88iivg5ke

Authorization: Basic ahlbQ==

Pragma: no-cache

Cache-Control: no-cache




The following error was encountered:



Invalid Request




Some aspect of the HTTP Request is invalid.  Possible problems:

Missing or unknown request method
Missing URL
Missing HTTP Identifier (HTTP/1.0)
Request is too large
Content-Length missing for POST or PUT requests
Illegal character in hostname; underscores are not allowed

Your cache administrator is  mailto:webmaster webmaster . 




Generated Thu, 09 Oct 2008 17:09:09 GMT by netgate.xyz (squid/2.6.STABLE14)




STATUS :
error
411

EXCEPTION :
undefined



In Firebug, the following appear under tab Heading:
Response
Server  squid/2.6.STABLE14
DateThu, 09 Oct 2008 17:09:09 GMT
Content-Typetext/html
Content-Length  1854
Expires Thu, 09 Oct 2008 17:09:09 GMT
X-Squid-Error   ERR_INVALID_REQ 0
X-Cache MISS from netgate.xyz
X-Cache-Lookup  NONE from netgate.xyz:4138
Via 1.0 netgate.xyz:4138(squid/2.6.STABLE14)
Proxy-Connectionclose
Request
Hostxyz.belfla.be
User-Agent  Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.3)
Gecko/2008092417 Firefox/3.0.3
Accept  application/json, text/javascript, */*
Accept-Language fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  300
Connection  keep-alive
X-Requested-WithXMLHttpRequest
Referer http://xyz.belfla.be/public/xxx/auth/login
Cookie  PHPSESSID=sjaj2sb2kcqm3th88iivg5ke

Under tab Response:


http://www.w3.org/TR/html4/loose.dtd";

>



ERROR: The requested URL could not be retrieved





ERROR

The requested URL could not be retrieved





While trying to process the request:



POST /public/xxx/tree/get-computer-by-a/a/A782 HTTP/1.0

Host: xyz.belfla.be

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.3)
Gecko/2008092417 Firefox/3.0.3

Accept: application/json, text/javascript, */*

Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: identity,gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

X-Requested-With: XMLHttpRequest

Referer: http://xyz.belfla.be/public/xxx/auth/login

Cookie: PHPSESSID=sjaj2sb252ogm3th88iivg5ke

Authorization: Basic aGhlbQ==

Pragma: no-cache

Cache-Control: no-cache





The following error was encountered:







Invalid Request







Some aspect of the HTTP Request is invalid.  Possible problems:



Missing or unknown request method

Missing URL

Missing HTTP Identifier (HTTP/1.0)

Request is too large

Content-Length missing for POST or PUT requests

Illegal character in hostname; underscores are not allowed



Your cache administrator is  mailto:webmaster webmaster . 







Generated Thu, 09 Oct 2008 17:09:09 GMT by netgate.xyz (squid/2.6.STABLE14)






Can anyone help ?

Thank you.
-- 
View this message in context: 
http://www.nabble.com/Ajax-request-Error---please-help-tp19903424s27240p19903424.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] ajax request error

2007-05-30 Thread debussy007


Hi,

I am calling an Ajax request to the server (J2ee, Struts Action) to get a
number :

*
alert(date);
alert(flight);

var html = $.ajax({
url: "ATBAjaxHandler.do",
data: "service-name=nb_places_available&date="+date+"&flight="+flight
}).responseText;

alert("HTML = "+html);
document.getElementById('nbPlacesAller').innerHtml = html;
*

in IE the last alert is never shown, in Mozilla it shows "HTML = " followed
by an empty string


I am returning the number like this in the server :

response.getWriter().println(""+nbActiveBooks);



Is there any way to know what is the actual error ?
I am really clueless on what to do.
Do you have any debugging tips ?

Thank you very much.
-- 
View this message in context: 
http://www.nabble.com/ajax-request-error-tf3840045s15494.html#a10872627
Sent from the JQuery mailing list archive at Nabble.com.