Set up
netcat as a listener on some port (say, 12345). Issue a request to that port using
wget or
curl, and also using your hand-coded client.
Code:
wget http://localhost:12345/some/file
See what
netcat reports and compare the makeup of your code's request to what the other HTTP clients use. HTTP requests are generally not complex.
--- rod.