{"id":13785244,"url":"https://github.com/edoriggio/cn-web-server","last_synced_at":"2025-05-11T20:32:38.350Z","repository":{"id":112182943,"uuid":"353643242","full_name":"edoriggio/cn-web-server","owner":"edoriggio","description":"Project for the Computer Networking course @ USI University","archived":false,"fork":false,"pushed_at":"2021-04-10T10:22:27.000Z","size":1288,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T19:09:20.070Z","etag":null,"topics":["http","socket-programming","webserver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edoriggio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-04-01T09:20:04.000Z","updated_at":"2021-04-10T10:23:26.000Z","dependencies_parsed_at":"2023-03-13T13:29:17.539Z","dependency_job_id":null,"html_url":"https://github.com/edoriggio/cn-web-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoriggio%2Fcn-web-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoriggio%2Fcn-web-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoriggio%2Fcn-web-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edoriggio%2Fcn-web-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edoriggio","download_url":"https://codeload.github.com/edoriggio/cn-web-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225094395,"owners_count":17419986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","socket-programming","webserver"],"created_at":"2024-08-03T19:00:58.428Z","updated_at":"2024-11-17T21:31:11.032Z","avatar_url":"https://github.com/edoriggio.png","language":"Python","funding_links":[],"categories":["Fourth Semester"],"sub_categories":[],"readme":"# Roma Capoccia Web Server\n\n## Abstract\n\nThis is a web server that works with a subsection of the HTTP methods. It is implemented using python 3 and only uses python's ```socket``` library to handle requests and send back resoponses. The server is also multithreaded and accepts both HTTP/1.0 and HTTP/1.1 requests (thus being able to keep sockets alive).\n\n## Execution Steps\n\nIn oder to run the server, just type in the terminal the following line\n\n```bash\npython3 ./server.py {PORT_N}\n```\n\nWhere ```PORT_N``` is the port number (default is 80). In order to view one of the websites in the web browser, change the first index of hosts. 0 = Edoardo Riggio, 1 = Matteo Bernaschina, 2 = Matteo Alberici (located in server.py):\n\n```python\n190   # CHANGE THIS LINE IN ORDER TO SEE A STUDENT'S WEBSITE IN THE BROWSER\n191   HOST = hosts[0][0]\n...\n248   # CHANGE THIS LINE IN ORDER TO SEE A STUDENT'S WEBSITE IN THE BROWSER\n249   HOST = hosts[0][0]\n...\n298   # CHANGE THIS LINE IN ORDER TO SEE A STUDENT'S WEBSITE IN THE BROWSER\n299   HOST = hosts[0][0]\n...\n342   # CHANGE THIS LINE IN ORDER TO SEE A STUDENT'S WEBSITE IN THE BROWSER\n343   HOST = hosts[0][0]\n```\n\n## Contributions\n\n| Student            | Tasks                                                                           |\n|--------------------|---------------------------------------------------------------------------------|\n| Edoardo Riggio     | Task A, Task B, Task C, Task D, Task E, Task F, Task G, Task H, Optional Task A |\n| Matteo Alberici    | Task A, Task B, Task C, Task D, Task E, Task F, Task G, Task H, Optional Task B |\n| Matteo Bernaschina | Task A, Task B, Task C, Task D, Task E, Task F, Task G, Task H                  |\n\n## Notes\n\n- The server does not work well with requests that exceed the size of 1024 kB.\n- Socket hangs when an error code is sent in the browser, closes connection properly when error code is sent form Postman\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedoriggio%2Fcn-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedoriggio%2Fcn-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedoriggio%2Fcn-web-server/lists"}