i am writing a web server thats serves one html file but when i go to my browser and type in localhost:50000/home/user/www/index.html i get something like this
viewd on my browser
heres my code for writing to a socket
n = read(connectfd, buffer, 255 );
if (n < 0) error("ERROR reading from socket");
printf("Here is the message: %s\n",buffer);
FILE *open = NULL;
char err_msg[] = "Could not open";
while((open = fopen("/home/rocco/ww/home.html","r") != EOF))
{
n=write(connectfd, &open,1);
}
}