0
votes

I send this request to google.com,

GET /HTTP/1.1

Host: www.google.com

Connection: keep-alive

Cache-Control: max-age=0

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8

Accept-Encoding: gzip,deflate,sdch

Accept-Language: en-US,en;q=0.8

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

Cookie: NID=51=XHrnCh-WA2BjwFpfjavZ1dxy6JT98N0ojBEtkxBnP9uUEr3cLvm2ETGlr0q0JhWWcgth-z7Dm7J0NU-UpA77SiDtF2rh1DhzRRToW1jA0Ia7HmOzFepL9TdIW9MDacAK; rememberme=true; PREF=ID=5a917ae1d013ee33:U=8c5a025c53669947:FF=0:TM=1317242244:LM=1317291115:GM=1:S=n1cOehpkL6SuVhsK

I get this respond from google:

We're sorry... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now

Why do I get this answer? How can I fix this?

2
Fix what? What are you expecting to happen?Neil Thompson

2 Answers

0
votes

You get this answer because Google has an automated anti-bot service that attempts to detect automated queries.

To get around this, you would need to identify which part of your query is triggering the anti-bot protection. Probably the best thing to do in your case would simply to get in touch with Google support, or try the Google help forum: http://www.google.com/support/forum

0
votes

It looks like you're missing a space between the path and version in your request line. The following should work:

GET / HTTP/1.1

It also looks like you have a typo in one of your headers, Accept-Charqet instead of Accept-Charset.

Finally, you have extra line breaks between your headers, which will prevent the HTTP server from interpreting your request correctly. You should have a \r\n (carriage return, line feed) after each header and an addtional \r\n separating the headers from the body of the request.

The corrected request would look like:

GET / HTTP/1.1
Host: www.google.com
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: NID=51=XHrnCh-WA2BjwFpfjavZ1dxy6JT98N0ojBEtkxBnP9uUEr3cLvm2ETGlr0q0JhWWcgth-z7Dm7J0NU-UpA77SiDtF2rh1DhzRRToW1jA0Ia7HmOzFepL9TdIW9MDacAK; rememberme=true; PREF=ID=5a917ae1d013ee33:U=8c5a025c53669947:FF=0:TM=1317242244:LM=1317291115:GM=1:S=n1cOehpkL6SuVhsK

Where each line is terminated with \r\n and there is a empty line terminated with \r\n at the end.