I am trying to access the HTTP environment variables, particularly
REMOTE_ADDR
HTTP_VIA
HTTP_X_FORWARDED_FOR
i have written a small program that dumps the contents of a http packet to the screen, but i cant see the full set of variables i want. Does anyone know how i can access the full set of http variables.
(Linux, gcc)
This is the output of my program:
HTTP-Dump is starting on port 80
HTTP-Dump is listening on port 80
Waiting for a connection
Connection :
packet recieved :
packet size: 8500
GET http://www.google.com/ HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;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
Proxy-Connection: keep-alive
Cookie: PREF=ID=730cd87420aa9d66:CR=1:TM=1108661555:LM=110 8755738:GM=1:S=o86Whlr8YN1seXdf