[plug] [OT] http: different results from browser and telnet

Jason Nicholls jason at mindsocket.com.au
Thu Oct 25 16:04:07 WST 2001


> > > > Host: www.badlinks.com
> > > > GET /

> Basically my program gets the name www.badlinks.com from a query to
> dmoz.org (Open Directory "redhat linux") and then tries to fetch / from
> that hostname.
> 
> How can I get my page to return the same as netscape?

The answer has been given to you already ;)

In you C program output the Host header along with the GET request. eg:
(pseudocode)

	print "GET / HTTP/1.0\n"
	print "host: www.badlinks.com\n"
	print "\n\n"

The \n might need to be \r\n instead though.


Later,

Jason Nicholls
--------------------------------------------------------------------
Jason Nicholls    icq: 11745841    email: <jason at mindsocket.com.au>
Proprietor                        mobile: 0417 410 811
Mind Socket [web services]          http://www.mindsocket.com.au/
--------------------------------------------------------------------



More information about the plug mailing list