The input you have provided will be generated by browser.
http://localhost:11880/path
the above line means; that your browser will connect with your server with port 11880. So, your server will have to response to port 11880
There are four request perform by web server
1. GET
2. POST
3. DELETE //in general disabled for security purpose
4. HEADER //in case of header response server reply with only header no data.
As a starter you think only about message 200 and 404.
200=if the file is available
404=if the requested file is not available
here is an example of http response on a requst:
HTTP/1.1 200 OK
Date: Sun, 22 Dec 2013 23:55:12 GMT
Server: Apache
X-Powered-By: PHP/5.3.27
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/javascript
two important response is
line 1: that will say file status:
line 11: that will tell the browser about the type of replied data.
just make this two:
HTTP/1.1 200 OK\r\n
Content-Type: text/javascript\r\n
after these two two new line must have to be added "\r\n"; the other new line is at the end of content-type statement
then finally print rest of the file content.
Finally don't panic