How To Send Http/1.0 404 Not Found Error Page In C

S

searcher1234

I have wrote a web server by C language.
but I don't know how to send back error page to web browser if user type
wrong web address or name that will show HTTP/1.0 404 NOT FOUND.

One more is how I can stop server socket sending rubbish code if the
requested files are sent competely.

Thanks
 
K

Karthik Kumar

searcher1234 said:
I have wrote a web server by C language.
but I don't know how to send back error page to web browser if user type
wrong web address or name that will show HTTP/1.0 404 NOT FOUND.

One more is how I can stop server socket sending rubbish code if the
requested files are sent competely.

Thanks
Probably off-topic. May be comp.unix.programmer or any other n.g.
specific to your implementation that talks about sockets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top