From: Ahmed A. <asa...@ya...> - 2014-08-21 13:40:33
|
Hi Vasu, Then it goes to the header order. Stay tuned. Ahmed ________________________________ From: Vasudevan Comandur <vco...@gm...> To: Ahmed Ashour <asa...@ya...>; "htm...@li..." <htm...@li...> Sent: Thursday, August 21, 2014 3:36 PM Subject: Re: [Htmlunit-user] HTMLUnit with Recaptcha service of Google Hi Ahmed, Given below is the headers from Real Browser after Cleaning all the cookies to Google DOmain. Real Browser (First Request) GET /challenge?k=6Lf1-AQAAAAAAL9EskceOVja5Uh5_yo1FRtb1Q83 HTTP/1.1 Host api.recaptcha.net User-Agent Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0 Accept */* Accept-Language en-US,en;q=0.5 Accept-Encoding gzip, deflate Referer http://www.patcurtis.com/captcha/recaptcha_demo.php Connection keep-alive WebServer (REsponse) HTTP/1.1 302 Moved Temporarily Cache-Control no-cache, no-store, max-age=0, must-revalidate Pragma no-cache Expires Fri, 01 Jan 1990 00:00:00 GMT Date Thu, 21 Aug 2014 13:03:52 GMT Location http://www.google.com/recaptcha/api/challenge?k=6Lf1-AQAAAAAAL9EskceOVja5Uh5_yo1FRtb1Q83 Content-Type text/html; charset=UTF-8 Content-Encoding gzip X-Content-Type-Options nosniff X-XSS-Protection 1; mode=block Content-Length 227 Server GSE Alternate-Protocol 80:quic Real Browser (Request) GET /recaptcha/api/challenge?k=6Lf1-AQAAAAAAL9EskceOVja5Uh5_yo1FRtb1Q83 HTTP/1.1 Host www.google.com User-Agent Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0 Accept */* Accept-Language en-US,en;q=0.5 Accept-Encoding gzip, deflate Referer http://www.patcurtis.com/captcha/recaptcha_demo.php Connection keep-alive WebServer (Response) HTTP/1.1 200 OK Cache-Control no-cache, no-store, max-age=0, must-revalidate Pragma no-cache Expires Fri, 01 Jan 1990 00:00:00 GMT Date Thu, 21 Aug 2014 13:03:52 GMT Set-Cookie NID=67=A_R74sa5dgTU0ms8LNjCLzfOwICle-mGKh64KGxg-NW37H5t3OLdmeB738prGT8f4UHk_dTG4erieysRFx0mT-RIlgZRY-L02ZEOPyNw9FE9jSJ96Tga1AYcamWp4fdo;Domain=.google.com;Path=/;Expires=Fri, 20-Feb-2015 13:03:52 GMT;HttpOnly P3P CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info." Content-Type text/javascript Content-Encoding gzip X-Content-Type-Options nosniff X-XSS-Protection 1; mode=block Content-Length 7081 Server GSE Alternate-Protocol 80:quic With this I tried more than 350 times and there was no error image thrown by Google. I Hope this helps to solve the issue. REgards Vasu On Thu, Aug 21, 2014 at 5:32 PM, Ahmed Ashour <asa...@ya...> wrote: Hi Vasu, > > > > >>> As you see the headers are identical. But Recaptcha service throws error image after around 200 refreshes done from > > > >Well, they are not, there is a big cookie header in the second request of real browser, but HtmlUnit sends nothing. > > > > >CookiePREF=ID=27454a65a243cd70:U=508d4e3f9fa20406:FF=0:LD=en:TM=1406649235:LM=1407436763:GM=1:S=aCHb3CgmGRRcedMi; _ga=GA1.1.1138220839.1407426218; OGP=-4061129:; SID=DQAAAMkAAABEIRL4EB_u_34e9SPchv4-B1gv-ecyCxqE9yuqGcSCBx8fvByoEltivh8scqBkKd-g3_BS4QjJUAb54fr-Xl8SrIiSkJYVlD4dtJn2YB5JIgD7s_hCHT58eMV11jkFKy1NL3R91ibbv0inWCLlle59rF3VKaYOK1BhT_P0RFgbhttdSCq_sPccI_ejQe6Q4tem-CErtVlzQbnSq1idOr-XMoSHn6t0hzsRkrtFs7vzdShkayUlnnee5ruugolGON6gNN0gVQ2xY8XPdwYDBx_T; HSID=AvFUJATSD2LR-GOTz; APISID=_q3L-5Jckjza4xOL/AM5CzbFXam4moeOPb > > > > >I guess this is a much higher possibility than the header order. > > >Please investigate which request returns the response with that values of those cookies, and what are the corresponding HtmlUnit request/response. > > >Ahmed > > > > >________________________________ > > |