DOC PREVIEW
NU EECS 340 - Project 1 Web client and server

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Project 1 Web client and serverProject GoalsPowerPoint PresentationHTTP UsageRequest - ResponseHTTP 1.0+ RequestRequest LineThe Header LinesHeadersExample HTTP HeadersExample GET RequestWell Known AddressFour partsProject 1Web client and serverAshish GuptaCS 340Jan 2004Project Goals•Implement a simple WWW client and server–Examples•Use a restricted subset of HTTP•Use socket programming•To give you experience with HTTP and sockets programmingHTTP ProtocolSocketsHTTP Usage•HTTP is the protocol that supports communication between web browsers and web servers.•A “Web Server” is a HTTP server•Most clients/servers today speak version 1.1, but 1.0 is also in use.Request - Response•HTTP has a simple structure:–client sends a request–server returns a reply.HTTP 1.0+ Request•Lines of text (ASCII).•Lines end with CRLF “\r\n”•First line is called “Request-Line”Request-LineHeaders...Content...blank lineblank lineRequest LineMethod URI HTTP-Version\r\n•The request line contains 3 tokens (words).•space characters “ “ separate the tokens.•Newline (\n) seems to work by itself (but the protocol requires CRLF)The Header Lines•After the Request-Line come a number (possibly zero) of HTTP header lines.•Each header line contains an attribute name followed by a “:” followed by a space and the attribute value.The Name and Value are just text.Headers•Request Headers provide information to the server about the client–what kind of client–what kind of content will be accepted–who is making the request•There can be 0 headers (HTTP 1.0)•HTTP 1.1 requires a Host: headerExample HTTP HeadersAccept: text/htmlHost: www.northwestern.eduFrom: [email protected]: Mozilla/4.0Referer: http://foo.com/blahExample GET RequestGET /~ychen/examanswers.html HTTP/1.1Accept: */*Host: www.cs.northwestern.eduUser-Agent: Internet Explorer From: [email protected]: http://foo.com/There is a blank line hereWell Known Address•The “well known” TCP port for HTTP servers is port 80.•Other ports can be used as well...Four parts•0: Get build , configure and run the minet stack•1: HTTP Client•2: Connection-at-a-time HTTP Server•3: Simple select-based Multiple-connection-at-a-time server•4: Complex …. ( Extra Credit


View Full Document

NU EECS 340 - Project 1 Web client and server

Download Project 1 Web client and server
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project 1 Web client and server and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project 1 Web client and server 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?