- The main server file is https.py
- To run the server file:
python3 https.py 12000
(Any Port number can be given by user, we are assuming it to be 12000) - To run the automated testing file:
python3 testing.py 12000
- Configuration file of the server is conf.py
- Log file of server is access.log and error logs are stored in errors.log and will get updated as you make new requests.
- Type 'quit' on server if you want to end the server program.
- HTTP Request Methods Implemented: GET, PUT, POST, DELETE, HEAD
- Implemented Status Codes: 200, 201, 202, 204, 304, 400, 403, 404, 408, 411, 413, 414, 415, 510
- Configurations file: For some server operations, a configuration file with Document Root was implemented.
- Implemented Cookies and handled Persistent and non-Persistent connections
- Multithreading in server: Implemented multithreading in server to run multiple requests simultaneously
- Logging: INFO logs and ERROR logs get stored for subsequesnt requests in access.log and errors.log respectively.
- Automated Tests: Implemented different tests using requests module and for sample website using webbrowser module
- Implemented Cookies and handled Persistent and non-Persistent connections
- Once you run the server file, you can make multiple requests using browser or using POSTMAN.
- To check on browser, you can:
- To view HTML file on browser, go to http://127.0.0.1:12000/index.html
- To view png image file on browser, go to http://127.0.0.1:12000/pic.png
- To view jpg image file on browser, go to http://127.0.0.1:12000/pic.jpg
- To view jpeg image file on browser, go to http://127.0.0.1:12000/pic.jpeg
- To view mp3 song file on browser, go to http://127.0.0.1:12000/song.mp3
- To view mp4 video file on browser, go to http://127.0.0.1:12000/video.mp4
404 Not Found | 408 Request Timeout |
---|---|
413 Request Entity Too Large | 501 Not Implemented |
---|---|
DELETE Request | 415 Unsupported Media Type |
---|---|