PDA

View Full Version : 407 Proxy Authentication



koharudin
27 Jun 2010, 6:09 AM
Hi, i have a problem here.

when i want to request google service it failed.

I use this script

Ext.Ajax.request({
url : 'http://www.sencha.com/forum/topics-remote.php?start=0&limit=20&forumId=4&_dc=1277646866039',
success : function(){

},
failure : function(){

}
})

The response code in firebug is 407 Proxy Authentication required.

and the request headers information are

Host www.sencha.com
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4
Accept application/json, text/javascript, */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Proxy-Connection keep-alive
Referer http://10.151.34.132/qotour/
Content-Length 0
Content-Type text/plain; charset=UTF-8
Origin http://10.151.34.132


If i take a look an example from extjs in ext-3.2.1/examples/form/custom-access.html, it could access.
And the request headers are

Host www.sencha.com
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Proxy-Connection keep-alive
Referer http://localhost/ext-3.2.1/examples/form/custom-access.html
Cookie SENCHASRV=web02; __qca=P0-2412255-1277627096937; __utma=263141134.1355747995.1277627097.1277644716.1277646856.4; __utmc=263141134; __utmz=263141134.1277632697.2.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=constructor%20initComponent%20extjs; _jsuid=8674904643157553230; bb_; bb_lastvisit=1277632695; bb_lastactivity=0; PHPSESSID=mu2qstv6an0plegipkhbolb647; __utmb=263141134.1.10.1277646856
Proxy-Authorization Basic a29oYXIwNUBjcy5pdHMuYWMuaWQ6a29oYXJ1ZGluMDcxMg==


And the difference is Proxy-Authorization, how to do that in Ajax.request ?


Thanks