hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Cantonna <pe...@hotmail.com>
Subject RE: Getting status: 403 Bad Behavior from a website which loads fine in browser
Date Wed, 04 Jun 2008 07:15:52 GMT

Personnaly, I use wireshark (free tool) to check this kind of problem.

Or you can just try with the code below. It is the code I use to mimic the Opera browser.
(Change the accept-encoding header to the commented one if your code doesn't handle gzip streams
etc)


	method.addRequestHeader("User-Agent", "Opera/9.25 (Windows NT 5.1; U; en)");
	method.addRequestHeader("Accept" ,"text/html, application/xml;q=0.9, application/xhtml+xml,
image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1");
	method.addRequestHeader("Accept-Language", "fr-LU,fr;q=0.9,en;q=0.8");
	method.addRequestHeader("Accept-Charset", "iso-8859-1, utf-8, utf-16, *;q=0.1");
	method.addRequestHeader("Accept-Encoding", "deflate, gzip, x-gzip, identity, *;q=0");
	//method.addRequestHeader("Accept-Encoding", "identity");
	method.addRequestHeader("Connection", "Keep-Alive, TE");
	method.addRequestHeader("TE", "deflate, gzip, chunked, identity, trailers");
_________________________________________________________________
Faites vous de nouveaux amis grâce à l'annuaire des profils Messenger !
http://home.services.spaces.live.com/search/?page=searchresults&ss=true&FormId=AdvPeopleSearch&form=SPXFRM&tp=3&sc=2&pg=0&Search.DisplayName=Nom+public&search.gender=&search.age=&Search.FirstName=Pr%C3%A9nom&Search.LastName=Nom&search.location=Lieu&search.occupation=Profession&search.interests=amis&submit=Rechercher
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message