-
Notifications
You must be signed in to change notification settings - Fork 7
Session 15: Practice 5
- Time: 2h
- Date: Wednesday, March-18th-2020
-
Goals:
- Practicing with the HTTP python module
- Develop the BASES2 server
The goal of this practice is to develop the same web server as the one of the practice 4, but using the HTTP python module instead of raw sockets. It should also treat all the resources requested as HTML files, so that the server can be fed with more data just by including more HTML files, and without having to modify the code
This table describe the names of the resources (path) for getting the web pages. The entry /filename means "any filename". You can specify any filename. If the Server has it, it will send it to the client. Otherwise the Error.html page is returned
Resource | html File | Description |
---|---|---|
/info/A.html | info/A.html | Information about the Adenine base. Color: lightgreen |
/info/C.html | info/C.html | Information about the Cytosine base. Color: yellow |
/info/G.html | info/G.html | Information about the Guanine base. Color: ligthblue |
/info/T.html | info/T.html | Information about the Guanine base. Color: pink |
/ | index.html | Main page: index. Color: white |
/index.html | index.html | Main page: index. Color: white |
/filename | filename | "filename" page if it exist |
/filename | Error.html | Error page, if "filename" does not exist |
NOTE: This webserver is extremely easy if you already have finished the server from the Practice 4 and the exercises of the Session 14
For making it works, you only have to change small things and pay attention to the details
Implement the server. Use the same HTML files from the practice 4, with small modifications for working ok on this server. The A,C, T and G HTML pages are store into the P5/info/ folder
- Server Filename: P5/Bases2-webserver.py
-
HTML files:
- P5/index.html
- P5/Error.html
- P5/info/A.html
- P5/info/C.html
- P5/info/T.html
- P5/info/G.html
In this animation you can see it working:
The session is finished. Make sure, during this week, that everything in this list is checked!
- You have all the items of the session 14 checked!
- Your working repo contains the P5 Folder with the following files:
- info/A.html
- info/C.html
- info/G.html
- info/T.html
- Error.html
- index.html
- Bases2-webserver.py
- All the previous files have been pushed to your remote Github repo
- Juan González-Gómez (Obijuan)
- Alvaro del Castillo. He designed and created the original content of this subject. Thanks a lot :-)
S0: Introduction
S1: Tools I
S2: Tools II
S3: Practicing with the tools
S8: Client-Server-1
S9: Client-Server-2
S10: Client-server-3
S11: Client-server-4
S12: HTTP protocol-1
S13: HTTP protocol-2
S14: HTTP module
S15: HTTP module
S16: HTML forms
S17: HTML forms