-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcode_summary.txt~
More file actions
32 lines (18 loc) · 2.16 KB
/
code_summary.txt~
File metadata and controls
32 lines (18 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Folders:
Brian's: echo_server.py and echo_client.py work nice when run from dos command prompt. Echo client sends a "Hello, world" and gets it back from the server. print_time.py works as expected. When called from Safary with "http://localhost:8080/" as the URL, thirty_minute_webserver.py displays a list of the files in the folder as links, one per row, with thirty_minute_webserver.py as one of the links. When you click the link, the browser shows you the file (text, mostly, or the image in favicon.ico).
web: folder of resources that can be requested with the fourth, fifth and sixth server scripts.
Files:
Chris's echo_client.py and echo_server.py work together to have the server return each thing the client sends and the client takes input from the user on what to send.
httpdate.py: Formats dates to HTTP 1.1 spec.
http_serve1.py: Returns tiny_html.html without headers, which shows up fine in Safari. I couldn't figure out how to quit this from within the cmd window where I had run this.
http_serve2.py: Returns tiny_html.html with headers and also prints the first 120 characters of the response.
http_serve3.py: Same as previous but also prints the requested resource and querystring.
http_serve4.py: Same as previous but instead of tiny_html.html, it returns a list of the files and folders in the web folder in plain text. Or if you point the url to the images subfolder of web (like: http://localhost:50000/images/) you get a list of the files in the images folder.
http_serve5.py: Same as previous but when you add a resource to the URL that exists, it returns that resource. Examples include:
http://localhost:50000/a_web_page.html
http://localhost:50000/sample.txt
http://localhost:50000/images/sample_1.png
http_serve6.py: Same as previous but the html is formatted into paragraphs and an extra url is added which retrieves the time:
http://localhost:50000/get_time
this_dir.html: Template HTML for a directory listing of the folders and files in the week-05\code\ directory.
tiny_html.html: File returned by the first three server scripts.