Tag: 404

How create HTTP-Server using python Socket – Part II

How create HTTP-Server using python Socket – Part II

Hi guys, today i am going to show you hove add some extra features to our simple HTTP-Sever created using python socket module. So if you have no idea what is it please refer my previous blog post.

Previous post I describe you how send string as response. Here i will explain how send file. Yeh ! .html , .css , .jpg , .png and .js files can send. Again i want to say if you have no idea about this please first read this post.

First we should identify which file is client request. Then we can check whether its available in our container or not. If file exist we can send it and if not we should send error message saying file not exist.

Continue reading “How create HTTP-Server using python Socket – Part II”

Web Status Codes

Web Status Codes

The status codes are all three-digit numbers that are grouped by the first digit into 5 groups. The reason phrases given with the status codes below are just suggestions. Server can return any reason phrase they wish.

1xx: Informational

No 1xx status codes are defined, and they are reserved for experimental purposes only.

2xx: Successful

Means that the request was processed successfully.

  • 200 OK
  • Means that the server did whatever the client wanted it to, and all is well.

  • Others
  • The rest of the 2xx status codes are mainly meant for script processing and are not often used.

Continue reading “Web Status Codes”