I've like to have inetd serve up a file, using cat.
I've added the entry to /etc/services:
reportsock 44000/tcp #Reportsock
I've added an entry to /etc/inetd.conf and restarted inetd:
reportsock stream tcp nowait reportsock /bin/cat /tmp/reportsock
When I request that port, I get the following:
GET / HTTP/1.1
Host: herring.hcareers.com:44000
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517 Firefox/1.0.4 (Debian package 1.0.4-2)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pl
ain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Any idea how I can get it to spout the file instead of the headers?
Thanks,
KS |