connecting…
connected
HTTP/1.1 400 Bad Request
Date: Fri, 10 Feb 2012 22:34:05 GMT
Server: Apache
Content-Length: 277
Connection: close
Content-Type: text/html; charset=iso-8859-1
400 Bad Request
Bad Request
Your browser sent a request that this server could not understand.
Apache Server at * Port 80
disconnecting.
while if I made the request to google.com it returns a valid response knowing that the requested page exists and have a body
can somebody help me with this ?
What if you add the line "Host: www.inteliouse.com" after your GET line?
Think about it this way...you just connected to an IP address. Now you're requesting /service.php. From what site? A lot of times you can have multiple sites hosted on the same server, so you need to tell it what site is being accessed.
Hopefully that's the problem.
And you don't really need to paste the entire HTML error response...just the headers have everything relevant.
In one case, you got a 400 error code (badly formed request). In the other case, you got a 404 error code (file not found). I hardly think that these are the same.
I would suggest you check the "/service.php" part of the below to ensure correct spelling, capitalization, directory location and such. I tried the DnsWebClient code with my web server and it worked without issues.
actually you are right @macegr
many websites on the same host , and all I get is the ip address of the host
In my case I used the username to denote my pages
macegr:
You might want to read up on HTTP a bit more...
What if you add the line "Host: www.inteliouse.com" after your GET line?
Think about it this way...you just connected to an IP address. Now you're requesting /service.php. From what site? A lot of times you can have multiple sites hosted on the same server, so you need to tell it what site is being accessed.
Hopefully that's the problem.
This recommendation helped a lot. Thank you!
Here's exactly how mine looked when it ran successfully: