LURP Details - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

LURP Details

Description:

Server: Apache/2.0.52 (Fedora) Last-Modified: Fri, 15 Sep 2006 19:41:41 GMT ... Server: Apache/2.0.52 (Fedora) Last-Modified: Mon, 27 Nov 2006 14:17:03 GMT ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 11
Provided by: markc195
Category:
Tags: lurp | details | fedora

less

Transcript and Presenter's Notes

Title: LURP Details


1
LURP Details
2
LURP Lab
3
Details
  • 1.Given a GET http// call a proxy CGI script in
    the same way you would for a normal CGI request
  • 2.This UDP perl script
  • If it is in the cache, return it.
  • If it is not in the cache, send a UDP request to
    the broadcast address port 5656
  • IP Address, random port, URL sent to broadcast
    address
  • Listen on that port for a response
  • If no response get it yourself from the source
  • Send the result back to the browser
  • 3. UDP Listen process
  • Recv on port 5656
  • If it is in the cache, send it to the address and
    port in the request.

4
Proxy Cache
  • The file can contain a simple comma delimited
    list of (URL, Filename, timestamp).
  • Keep a fixed number of entries in the cache (20)
  • When the cache is full, replace the least
    recently used entry

5
Protocol
  • Broadcast message
  • IP AddressPortURLCRLF
  • 192.168.2.2112345http//cnn.com/foo.html
  • Response
  • Normal Response including HTTP/1.0 200 OK
  • Dont generate this from your web server

6
Proxy Session Request
  • GET http//star.cs.byu.edu/test.html HTTP/1.1
  • Host star.cs.byu.edu
  • User-Agent Mozilla/5.0 (Macintosh U Intel Mac
    OS X en-US rv1.8.0.8) Gecko/20061025
    Firefox/1.5.0.8
  • Accept text/xml,application/xml,application/xhtml
    xml,text/htmlq0.9,text/plainq0.8,image/png,/
    q0.5
  • Accept-Language en-us,enq0.5
  • Accept-Encoding gzip,deflate
  • Accept-Charset ISO-8859-1,utf-8q0.7,q0.7
  • Keep-Alive 300
  • Proxy-Connection keep-alive

7
Proxy Response
  • HTTP/1.0 200 OK
  • Date Mon, 27 Nov 2006 140214 GMT
  • Server Apache/2.0.52 (Fedora)
  • Last-Modified Fri, 15 Sep 2006 194141 GMT
  • ETag "8839e-14-369ca740"
  • Accept-Ranges bytes
  • Content-Length 20
  • Content-Type text/html charsetISO-8859-1
  • X-Cache MISS from weau-proxy
  • Proxy-Connection keep-alive
  • lthtmlgt
  • TEST
  • lt/htmlgt

8
Normal Response
  • HTTP/1.1 200 OK
  • Date Mon, 27 Nov 2006 141707 GMT
  • Server Apache/2.0.52 (Fedora)
  • Last-Modified Mon, 27 Nov 2006 141703 GMT
  • ETag "8839e-14-300c55c0"
  • Accept-Ranges bytes
  • Content-Length 20
  • Connection close
  • Content-Type text/html charsetISO-8859-1
  • lthtmlgt
  • TEST
  • lt/htmlgt

9
Details
  • You will need to read the Content-Length from the
    first response you receive so you can know where
    it ends
  • You may get multiple responses to the same
    request
  • You should put in a different random port each
    time so you dont get responses from the last
    request.

10
Compatibility
  • An existing proxy server will be listening on
    port 5656 and will respond to requests for
    http//star.cs.byu.edu/test.html
  • You can use this to test for compatibility
Write a Comment
User Comments (0)
About PowerShow.com