Homework 1ΒΆ

Due by noon on Thursday, Jan 16th. Reminder, per the syllabus you may use The Google, friends, family, etc. to complete the homework.

  1. Sign up for the class mailing list.

  2. Sign up for a github account (it’s free!) at http://github.com/. (You can use whatever account name you want, but it will be public and may be connected to your real name by The Google, so ‘luzer420’ is probably a bad idea for your future.)

  3. Go to the cse491-serverz repository and fork it into your own github account; then, clone it into your own CSE cluster account on arctic and follow the instructions in README.txt to get ‘server.py’ running. (See Basic Instructions for Git and Github for clone instructions. Please feel free to use your own computer, too; just make sure you’re using python2.7 and a recent version of git.)

    Once you have server.py running, modify the code to return an HTTP 1.0 response, containing ‘200 OK’ response line, a ‘Content-type’ of text/html, and a message body saying ‘<h1>Hello, world<h1> this is ctb’s Web server.’ (Replace ‘ctb’ with your own NetID or github username.)

    For more information on HTTP, please see this link:

    especially ‘Sample HTTP exchange’. Note, you can emit a CRLF in Python with “\r\n”.

    Verify that when you point your Web browser at your network server, you see the message you wrote, with ‘Hello, world’ in bigger letters than the rest. (The <h1> and </h1> should be invisible.)

    Once complete, commit your changes with a sensible commit message, and push them to your repository (again, see Basic Instructions for Git and Github). Make sure your changed code is present in your repository by visiting the Web site for your repository and viewing the code. Deviation will not be tolerated.

    OPTIONAL: immediately after the ‘accept’ call, put in a line ‘print c.recv(1000)’. What does this do, and what is the format of the output?

  4. Update ChangeLog with whatever it is you’ve changed; commit, push. (Yes, this is part of your homework.)

  1. Fill out this form so that I know what repository is connected to what NetID!

Links:

Previous topic

Day 2: Thursday, January 9th, 2014

This Page

Edit this document!

This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.

  1. Go to Homework 1 on GitHub.
  2. Edit files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
  3. Fill in the Commit message text box at the bottom of the page describing why you made the changes. Press the Propose file change button next to it when done.
  4. Then click Send a pull request.
  5. Your changes are now queued for review under the project's Pull requests tab on GitHub!

For an introduction to the documentation format please see the reST primer.