Understanding HTTP Protocol, Proxy Servers and COSC 6377 Term Project in Fall 2000, Study Guides, Projects, Research of Computer Systems Networking and Telecommunications

An overview of the http protocol, its role in the web's client-server model, and the concept of proxy servers. It also introduces the cosc 6377 term project and its tutorial for fall 2000. Students will learn about http messages, their format, and the differences between non-persistent and persistent connections.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/17/2009

koofers-user-s4a
koofers-user-s4a 🇺🇸

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COSC 6377, Fall 2000
11/2/00
HTTP Protocol, Proxy,
and
COSC 6377 Term Project Tutorial
T. Mark Huang
http://www.cs.uh.edu/~jsteach/cosc6377/
COSC 6377, Fall 2000 2
The Web: the http protocol
http: hypertext transfer
protocol
Webs application layer
protocol
client/server model
client: browser that
requests, receives,
displays Web objects
server: Web server
sends objects in
response to requests
http1.0: RFC 1945, May 1996
http1.1: RFC 2068, Jan. 1997
PC running
Explorer
Server
running
NCSA Web
server
Mac running
Navigator
http request
http request
http response
http response
pf3
pf4
pf5
pf8

Partial preview of the text

Download Understanding HTTP Protocol, Proxy Servers and COSC 6377 Term Project in Fall 2000 and more Study Guides, Projects, Research Computer Systems Networking and Telecommunications in PDF only on Docsity!

HTTP Protocol, Proxy,

and

COSC 6377 Term Project Tutorial

T. Mark Huang

http://www.cs.uh.edu/~jsteach/cosc6377/

The Web: the http protocol

http: hypertext transfer

protocol

  • Web’s application layer protocol
  • client/server model
    • client: browser that requests, receives, “displays” Web objects
    • server: Web server sends objects in response to requests
  • http1.0: RFC 1945, May 1996
  • http1.1: RFC 2068, Jan. 1997

PC running Explorer

Server running NCSA Web server

Mac running Navigator

http request

http request

http response

http response

COSC 6377, Fall 2000 3

The http protocol: more

http: TCP transport service:

  • client initiates TCP connection (creates socket) to server, port 80
  • server accepts TCP connection from client
  • http messages (application-layer protocol messages) exchanged between browser (http client) and Web server (http server)
  • TCP connection closed

URL (Uniform Resource Locator)

has three parts: scheme, host name (w/port), and path name:

http://www.someSchool.edu:port/someDept/pic.gif

http example

Suppose user enters URL

http://www.someSchool.edu/someDepartment/index.html

1a. http client initiates TCP connection to http server (process) at www.someSchool.edu. Port 80 is default for http server.

  1. http client sends http request message (containing URL) into TCP connection socket

1b. http server at host www.someSchool.edu waiting for TCP connection at port 80. “accepts” connection, notifying client

  1. http server receives request message, forms response message containing requested object (someDepartment/home.index), sends message into socket

time

(contains text, references to 10 jpeg images)

COSC 6377, Fall 2000 7

http message format: request

  • two types of http messages: request , response
  • http request message:
    • ASCII (human-readable format)

GET http://www.uh.edu/index.html HTTP/1. User-agent: Mozilla/4. Accept: text/html, image/gif,image/jpeg Accept-language:fr

(extra carriage return, line feed)

request line (GET, POST, HEAD commands)

header lines

Carriage return, line feed indicates end of message

http request message: general format

COSC 6377, Fall 2000 9

http message format: respone

HTTP/1.0 200 OK

Date: Thu, 06 Aug 1998 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html

data data data data data ...

status line (protocol status code status phrase)

header lines

data, e.g., requested

html file Common Status Code:

200 OK

301 Moved Permanently 400 Bad Request 403 Forbidden 404 Not Found

HTTP Proxy

  • A HTTP proxy server

deals with HTTP servers

(web servers) on behalf

of HTTP clients

(browsers).

  • Proxy clients talk to

proxy servers, which

relay approved client

requests on to real

servers, and relay

answers back to clients.

client

Proxy server

client

http request http response

http request http response

http request http response http request http response

origin server

origin server

COSC 6377, Fall 2000 13

fork() v.s. select()

• to handle multiple connections

• fork(): start a new process to handle each

request. Easy to implement, but not scale well

and require interlocking for shared resource.

• select(): one process handles all requests.

Scale well and do not require interlocking for

shared resource, but more complex to

implement (may need to build state diagram).

Sample programs

Located in ~jsteach/www/cosc6377/proxy/skel/

• sample1.c - clear channel echo TCP client

• sample2.c & sample2-sig.c - clear channel echo

TCP server

For above client and sever programs, client sends whatever input from console to server , and server sends whatever input from console to client. You can use client to mimic browser and sever to mimic web server, and your proxy runs in-between them.

• pipe.cc - pipe(2) example

• http.cc - proxy filter library sample

Assignment

• Due midnight, Tu., Nov. 21st, 2000

• Start immediately!!

• 20% of your final grade

• Group project: 1 or 2 people

• Submission: detail will be posted on the web

• Turn in all required files (*.c, Makefile, & Readme)

• Read FAQ in the project web page

• Questions: send to [email protected] or post in

the newsgroup

• MOSS: Measure Of Software Similarity (UC Berkeley)