
This web server is responsible for intercepting these requests and handling them appropriately.Īlright, now that you know what a web server is and what its function is exactly, you might be wondering how does the request reach that yahoo machine in the first place?
#Python simpleftp server software
To reiterate, the machine that receives the http request has a software process called a web server running on it. This web server will intercept your request, and handle it by responding back with the html of the Yahoo home page.įinally your browser renders this html on the screen and that’s what you see on your screen.Įvery interaction with the Yahoo home page after that (for example, when you click on a link) initiates a new request and response exactly like the first one. This Request will travel all the way to a Yahoo computer that has a web server running on it.


Of course you are going to get the Yahoo home page rendered on your browser window.īut what really just happened under the hood?Īctually a lot of things have happened and I might dedicate a whole article to explain the magic behind how this happened.īut for the sake of simplicity, I will abstract away some of the details and talk about this at a very high level.Īt a high level, when you type your browser, your browser will create a network message called an HTTP request. Imagine you pull up your Chrome browser and type in the address bar. If you already know how web servers work, then you can skip directly to this section.Īn HTTP web server is nothing but a process that is running on your machine and does exactly two things:ġ- Listens for incoming http requests on a specific TCP socket address (IP address and a port number which I will talk about later)Ģ- Handles this request and sends a response back to the user.
#Python simpleftp server how to
In this article, I will cover how to create the most basic http web server in Python.īut because I want to make sure you understand what we are building, I am going to give an overview first about what web servers are and how they work. Or may be you are just configuring a web server for your website. May be you are building an API server for a backend service.

No matter what type of software engineer you are, at some point in your career you will have to interact with web servers. Heck you are interacting with one right now!
