Advertisements
Advertisements
प्रश्न
Discuss the functioning of a web server.
दीर्घउत्तर
Advertisements
उत्तर
A web server functions through a continuous cycle of listening, receiving, processing, and responding to client requests:
- Listen: Runs continuously in the background on a host machine, monitoring designated network ports (like port 80 for HTTP and 443 for HTTPS) for incoming connection requests.
- Receive: Accepts incoming HTTP/HTTPS requests from web browsers and reads the request method, target path, and headers.
- Process: Determines whether the request requires serving a pre-existing file directly (static content) or running backend scripts and database queries to build a page on the fly (dynamic content).
- Send: Packages the requested content into an HTTP response along with a status code (such as
200 OKor404 Not Found) and transmits it back to the browser.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1: Internet Basics - Assignment [पृष्ठ २५]
