LAMP, WEB ARCHITECTURE, AND HTTP

Size: px
Start display at page:

Download "LAMP, WEB ARCHITECTURE, AND HTTP"

Transcription

1 CS 418 Web Programming Spring 2013 LAMP, WEB ARCHITECTURE, AND HTTP SCOTT G. AINSWORTH

2 2 OUTLINE Assigned Reading Chapter 1 Configuring Your Installation pgs Brief Intro to Open Source Pieces of AMP Configuring Apache, PHP, MySQL Resources Open Source LAMP Web Architecture HTTP

3 3 OPEN SOURCE What is open source? When was the term coined (i.e., when was its first usage)? What was the first open source OS?

4 4 WHAT S SO SPECIAL ABOUT OPEN SOURCE PROJECTS? They re free no licensing or sales fees They are cross-platform and technology-neutral must run on more than one OS They must not restrict other software derivative works don t have to be open source They embraces diversity cannot discriminate against any person or group of persons

5 5 LAMP Linux OS Apache web server All are open source MySQL relational database system, enables PHP and Apache to work together PHP server-side scripting

6 6 LAMP FOR CS 418/518 sainsworth418.cs.odu.edu if you registered before Aug 7, you already have an account (same as CS Unix) put files in /~username/cs418_html/ create a /~username/cs418_html/example_code/ directory for in-class examples all directories in /~username/cs418_html/ should be chmod 755 only accessible from on-campus must use to access Linux Ubuntu Apache MySQL PHP 5.3.2

7 7 ASSIGNMENT FOR THURSDAY Subscribe to the class list Log in to sainsworth418.cs.odu.edu uid/passwds same as *.cs.odu.edu machines MySQL login == linux login; passwd = (to be determined) Start reading Ch 2 and practicing with the code examples me your group info! If you re not in a group by 11:59 PM February 7, 2012, you re solo.

8 8 OUTLINE Open Source LAMP Web Architecture HTTP

9 9 THE WEB User agent (client) for the Web is called a browser MS Internet Explorer Mozilla Firefox Apple Safari Google Chrome Server for the Web is called a Web server Apache (public domain) MS Internet Information Server (IIS)

10 10 WEB TERMINOLOGY Web page addressed by a URI consists of objects Most Web pages consist of base HTML page embedded objects

11 11 WEB TERMINOLOGY Web page addressed by a URI consists of objects Most Web pages <html lang="en"> <head> consist of <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <meta http-equiv="content-type" content="text/html; charset=iso "> <title>cnn.com</title> <meta http-equiv="refresh" content="1800; URL= <link rel="stylesheet" href=" type="text/css"> base HTML page embedded objects <script language="javascript1.1" src=" type="text/javascript"> </script> <script language="javascript1.1" type="text/javascript"> </script> <script language="javascript1.1" src=" <style type="text/css"></style> <script language="javascript">document.adoffset=0</script> </head> <body class="cnnmainbody" bgcolor="#ffffff"> <a name="top_of_page"></a> : :

12 12 DEFINING THE WEB / HTTP HTTP was originally defined by Request for Comments (RFCs) 1945, 2068, 2616 and several others for defining URLs, URIs, etc. While RFC 2616 remains canonical for HTTP, we have a new document for the Web (URIs + protocols + formats) : The Architecture of the World Wide Web, Volume One -

13 13 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC MUST This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification. 2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification. 3. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course. HOW TO READ RFCS (QUOTING FROM RFC 2119) 4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label. 5. MAY This word, or the adjective "OPTIONAL", mean that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option MUST be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.)

14 14 EXAMPLES FROM RFC Forbidden The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated Method Not Allowed The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource Request Timeout The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.

15 15 READING THE W3C ARCH Principles fundamental rule or law that is widely applicable Constraints definitions imposed by the architects of the Web MUST, SHALL Good Practice things you should be doing, but they can t / shouldn t be defined as constraints SHOULD, RECOMMENDED

16 16 EXAMPLE IDENTIFIERS Principle: Global Identifiers Global naming leads to global network effects. Good practice: Identify with URIs To benefit from and increase the value of the World Wide Web, agents should provide URIs as identifiers for resources. Constraint: URIs Identify a Single Resource Assign distinct URIs to distinct resources.

17 17 UNIFORM RESOURCE IDENTIFIERS URI RFC 3986 (2396) URL RFC 1738 URN RFC 2141 A URN is similar to a person's name, while a URL is like a street address. The URN defines something's identity, while the URL provides a location. Essentially, "what" vs. "where".

18 18 URI SCHEMES \ / \ /\ / \ / \ / \_/ \ / \ / \ / userinfo hostname port parameter query fragment \ / \ / scheme authority path path interpretable as filename / \ / \ urn:example:animal:ferret:nose interpretable as extension taken from

19 19 IMPORTANT WEB ARCHITECTURE CONCEPTS (AS DEFINED BY THE WEB ARCHITECTURE) URIs identify Resources Representations represent Resources When URIs are dereferenced, they return representations (i.e., a resource is never returned) taken from:

20 20 W3C WEB ARCHITECTURE URI Representation 2 Identifies Represents Resource Content Negotiation The tools we have to solve the interoperability problem are: Resource URI Representation Represents Representation 1 slide from Herbert Van de Sompel

21 21 OUTLINE Open Source LAMP Web Architecture HTTP

22 22 HYPERTEXT TRANSFER PROTOCOL (HTTP) 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 PC running Firefox Mac running Safari Server running Apache

23 23 HTTP OVERVIEW HTTP uses TCP browser initiates TCP connection to server (on port 80) HTTP messages exchanged between browser and Web server HTTP is stateless server maintains no information about past browser requests

24 24 HTTP EXAMPLE User enters URI somedept/home.index referenced object contains HTML text and references 10 JPEG images Browser will read the file and sequentially make 10 separate requests for the embedded JPEG images Browser sends an HTTP GET request to the server Web Server Server will retrieve and send the HTML file Browser

25 25 HTTP EXAMPLE T/HOME.INDEX Client 1) Browser initiates TCP connection to server at Port 80 is well known for server Server 0) Server process at host waiting for TCP connections on port 80 time 3) Client writes an HTTP GET request message (containing path) to TCP socket 2) Server accepts connection 4) Server reads request message, forms response message containing requested object, writes message to socket

26 26 HTTP EXAMPLE T/HOME.INDEX Client 6) Browser reads response message containing the HTML file. Ten references to JPEG objects are found during the HTML parse 7) Client writes an HTTP GET request message (containing path) to TCP socket Server 8) Server reads request message, forms response message containing requested object, writes message to socket time The above steps are repeated for each of the 10 JPEG objects

27 27 HTTP REQUEST MESSAGE FORMAT HTTP messages are ASCII (human-readable) HTTP request message:» Request line» Optional header lines method <SP> path <SP> version <CR><LF> header field name : value <CR><LF>» Present only for some methods (e.g., POST) header field name : value <CR><LF> <CR><LF> entity body

28 28 LOTS OF HTTP METHODS GET, HEAD TRACE for debugging OPTIONS what methods are defined on this URI? DELETE rarely supported for most URIs PUT also rarely supported unix semantics: % echo hello world > temp.txt POST commonly supported unix semantics: % echo hello world spell Want to learn more? See RFC

29 29 GOOGLE CHROME REQUEST EXAMPLE How does Chrome process GET /~ainswort/ HTTP/1.1 Host: Connection: keep-alive User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/ Safari/535.1 Accept: text/html,application/xhtml+xml,application/ xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-us,en;q=0.8 Accept-Charset: ISO ,utf-8;q=0.7,*;q=0.3

30 30 HTTP RESPONSE MESSAGE FORMAT HTTP messages are ASCII (human-readable) HTTP response message:» Status line» Optional header lines» Requested object, error message message, etc. version <SP> code <SP> phrase <CR><LF> header field name : value <CR><LF> ` header field name : value <CR><LF> <CR><LF> entity body

31 31 HTTP RESPONSE STATUS CODES 1xx: Informational - Request received, continuing process 2xx: Success - The action was successfully received, understood, and accepted 3xx: Redirection - Further action must be taken in order to complete the request 4xx: Client Error - The request contains bad syntax or cannot be fulfilled 5xx: Server Error - The server failed to fulfill an apparently valid request from section of RFC 2616

32 32 RESPONSE STATUS CODES EXAMPLES 200 OK Request succeeded, requested object later in this message 301 Moved Permanently Requested object moved, new location specified later in this message (Location:) 400 Bad Request Request message not understood by server 404 Not Found Requested document not found on this server 505 HTTP Version Not Supported

33 33 TALKING TO HTTP SERVERS antares% curl --head HTTP/ OK Date: Fri, 22 Jun :41:01 GMT Server: Apache/ (Unix) PHP/5.3.5 mod_ssl/ OpenSSL/0.9.8q X-Powered-By: PHP/5.3.5 Expires: Tue, 01 Jan :00:00 GMT Cache-Control: no-store, no-cache, must-revalidate Content-Type: text/html; charset=iso ; antares$ curl --head HTTP/ OK Date: Fri, 22 Jun :41:28 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=iso curl is convenient, but speaking raw HTTP is more fun Set-Cookie: PREF=ID=53ea81e60c8225fb:FF=0:TM= :LM= : P3P: CP="This is not a P3P policy! See Server: gws X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked

34 34 TELNET EXAMPLE Connect to HTTP server and port Telnet output Type GET command plus blank line HTTP response status line HTTP response headers plus blank line % telnet 80 Trying Connected to Escape character is '^]'. GET /~sainswor/files/foo.txt HTTP/1.0 HTTP/ OK Date: Fri, 17 Sep :37:06 GMT Server: Apache/ (Unix) DAV/2 PHP/ Last-Modified: Tue, 15 Sep :14:46 GMT ETag: "921a a1c1d91187" Accept-Ranges: bytes Content-Length: 101 Connection: close Content-Type: text/plain Object content Telnet output ** This test file is stored in the UNIX ** file system at ** /home/sainswor/public_html/files/foo.txt Connection closed by foreign host.

35 35 TELNET EXAMPLE 2 Connect to HTTP server port Telnet output Type GET command plus blank line HTTP response status line HTTP response headers plus blank line Object content Telnet output % telnet 80 Trying Connected to Escape character is '^]'. GET /notexist.html HTTP/1.0 HTTP/ Object Not Found Date: Fri, 17 Sep :40:11 GMT Server: Apache Set-Cookie: CG=US:VA:Norfolk; path=/ Accept-Ranges: bytes Content-Type: text/html Content-Length: Connection: close <HTML> <HEAD> Error type Object Not Found </body> </html> Connection closed by foreign host.

36 36 POST Typically the result of HTML Forms Two types of values in the client s Content-type request header: application/x-www-form-urlencoded (original & default) multipart/form-data introduced in RFC-1867; allows file upload

37 37 ENCODING TYPES application/x-www-form-urlencoded Default. All characters are encoded before sent (spaces are converted to "+" symbols, and special characters are converted to ASCII HEX values) multipart/form-data No characters are encoded. This value is required when you are using forms that have a file upload control

38 38 HTML EXAMPLE X-WWW-FORM-URLENCODED <form action="demo_post_enctype.asp" method="post enctype="application/x-www-form-urlencoded"> First name: <input type="text" name="fname" /><br /> Last name: <input type="text" name="lname" /><br /> <input type="submit" value="submit" /> </form>

39 39 HTML EXAMPLE MULTIPART/FORM-DATA <form action="demo_post_enctype.asp" method="post enctype= multipart/form-data"> First name: <input type="text" name="fname" /><br /> Last name: <input type="text" name="lname" /><br /> <input type="submit" value="submit" /> </form>

40 40 HTTP LIVE HEADERS FIREFOX PLUGIN Allows you to view HTTP request and response headers in Firefox US/firefox/addon/live-httpheaders/

41 41 FEW WEB RESOURCES ARE STATIC FILES Client GET /foo HTTP/1.1 HTTP/ OK Origin Server foo foo HTML, JavaScript interpreted client-side (client receives code and browser interprets it) foo foo foo HTML, PDF, etc. PHP, ASP, JSP JavaScript PHP interpreted server-side (what gets sent to the client is the output of the code, not the code itself)

42 42 EXAMPLE DATA FLOW Web Browser GET suggest.html Web Server suggest.html GET xmlhelperfns.js xmlhelperfns.js user presses/releases 'J' key in textbox JavaScript function is called JavaScript causes HTTP request to be sent, calling PHP script GET gethint.php?q=j&sid=12345

43 43 EXAMPLE DATA FLOW Web Browser Web Server gethint.php executes Joe John Joseph event handler statechange() in JavaScript is called JavaScript function is called reply from server is written to the webpage

44 44 OUTLINE Open Source LAMP Web Architecture Up Next: PHP Assigned Reading: Ch 2 HTTP

Applications & Application-Layer Protocols: The Web & HTTP

Applications & Application-Layer Protocols: The Web & HTTP CS 312 Internet Concepts Applications & Application-Layer Protocols: The Web & HTTP Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11/

More information

Applications & Application-Layer Protocols: The Web & HTTP

Applications & Application-Layer Protocols: The Web & HTTP CPSC 360 Network Programming Applications & Application-Layer Protocols: The Web & HTTP Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu http://www.cs.clemson.edu/~mweigle/courses/cpsc360

More information

Introduction to HTTP. Jonathan Sillito

Introduction to HTTP. Jonathan Sillito Introduction to HTTP Jonathan Sillito If you interested in working with a professor next Summer 2011 apply for an NSERC Undergraduate Student Award. Students must have a GPA of 3.0 or higher to be eligible.

More information

HTTP Reading: Section and COS 461: Computer Networks Spring 2013

HTTP Reading: Section and COS 461: Computer Networks Spring 2013 HTTP Reading: Section 9.1.2 and 9.4.3 COS 461: Computer Networks Spring 2013 1 Recap: Client-Server Communication Client sometimes on Initiates a request to the server when interested E.g., Web browser

More information

World-Wide Web Protocols CS 571 Fall Kenneth L. Calvert All rights reserved

World-Wide Web Protocols CS 571 Fall Kenneth L. Calvert All rights reserved World-Wide Web Protocols CS 571 Fall 2006 2006 Kenneth L. Calvert All rights reserved World-Wide Web The Information Universe World-Wide Web structure: hypertext Nonlinear presentation of information Key

More information

Introduc)on to Computer Networks

Introduc)on to Computer Networks Introduc)on to Computer Networks COSC 4377 Lecture 3 Spring 2012 January 25, 2012 Announcements Four HW0 s)ll missing HW1 due this week Start working on HW2 and HW3 Re- assess if you found HW0/HW1 challenging

More information

The HTTP protocol. Fulvio Corno, Dario Bonino. 08/10/09 http 1

The HTTP protocol. Fulvio Corno, Dario Bonino. 08/10/09 http 1 The HTTP protocol Fulvio Corno, Dario Bonino 08/10/09 http 1 What is HTTP? HTTP stands for Hypertext Transfer Protocol It is the network protocol used to delivery virtually all data over the WWW: Images

More information

CS631 - Advanced Programming in the UNIX Environment

CS631 - Advanced Programming in the UNIX Environment CS631 - Advanced Programming in the UNIX Environment Slide 1 CS631 - Advanced Programming in the UNIX Environment HTTP; Code Reading Department of Computer Science Stevens Institute of Technology Jan Schaumann

More information

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017 CSC 401 Data and Computer Communications Networks Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017 Outline Application Layer (ch 2) 2.1 principles of network applications 2.2

More information

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications Internet and Intranet Protocols and Applications Lecture 7b: HTTP Feb. 24, 2004 Arthur Goldberg Computer Science Department New York University artg@cs.nyu.edu WWW - HTTP/1.1 Web s application layer protocol

More information

CS 43: Computer Networks. HTTP September 10, 2018

CS 43: Computer Networks. HTTP September 10, 2018 CS 43: Computer Networks HTTP September 10, 2018 Reading Quiz Lecture 4 - Slide 2 Five-layer protocol stack HTTP Request message Headers protocol delineators Last class Lecture 4 - Slide 3 HTTP GET vs.

More information

Computer Networks. Wenzhong Li. Nanjing University

Computer Networks. Wenzhong Li. Nanjing University Computer Networks Wenzhong Li Nanjing University 1 Chapter 8. Internet Applications Internet Applications Overview Domain Name Service (DNS) Electronic Mail File Transfer Protocol (FTP) WWW and HTTP Content

More information

World Wide Web, etc.

World Wide Web, etc. World Wide Web, etc. Alex S. Raw data-packets wouldn t be much use to humans if there weren t many application level protocols, such as SMTP (for e-mail), HTTP & HTML (for www), etc. 1 The Web The following

More information

Web, HTTP and Web Caching

Web, HTTP and Web Caching Web, HTTP and Web Caching 1 HTTP overview HTTP: hypertext transfer protocol Web s application layer protocol client/ model client: browser that requests, receives, displays Web objects : Web sends objects

More information

HyperText Transfer Protocol

HyperText Transfer Protocol Outline Introduce Socket Programming Domain Name Service (DNS) Standard Application-level Protocols email (SMTP) HTTP HyperText Transfer Protocol Defintitions A web page consists of a base HTML-file which

More information

CSE 333 Lecture HTTP

CSE 333 Lecture HTTP CSE 333 Lecture 19 -- HTTP Hal Perkins Department of Computer Science & Engineering University of Washington Administrivia Server-side programming exercise due Wed. morning HW4 due a week later - How s

More information

CSCI-1680 WWW Rodrigo Fonseca

CSCI-1680 WWW Rodrigo Fonseca CSCI-1680 WWW Rodrigo Fonseca Based partly on lecture notes by Scott Shenker and John Jannotti Precursors 1945, Vannevar Bush, Memex: a device in which an individual stores all his books, records, and

More information

WEB TECHNOLOGIES CHAPTER 1

WEB TECHNOLOGIES CHAPTER 1 WEB TECHNOLOGIES CHAPTER 1 WEB ESSENTIALS: CLIENTS, SERVERS, AND COMMUNICATION Modified by Ahmed Sallam Based on original slides by Jeffrey C. Jackson THE INTERNET Technical origin: ARPANET (late 1960

More information

EDA095 HTTP. Pierre Nugues. March 30, Lund University

EDA095 HTTP. Pierre Nugues. March 30, Lund University EDA095 HTTP Pierre Nugues Lund University http://cs.lth.se/pierre_nugues/ March 30, 2017 Covers: Chapter 6, Java Network Programming, 4 rd ed., Elliotte Rusty Harold Pierre Nugues EDA095 HTTP March 30,

More information

CSE 333 Lecture HTTP

CSE 333 Lecture HTTP CSE 333 Lecture 19 -- HTTP Hal Perkins Paul G. Allen School of Computer Science & Engineering University of Washington Administrivia HW4 due a week from Thursday - How s it look? Today: http; finish networking/web

More information

CSCI-1680 WWW Rodrigo Fonseca

CSCI-1680 WWW Rodrigo Fonseca CSCI-1680 WWW Rodrigo Fonseca Based partly on lecture notes by Sco2 Shenker and John Janno6 Administrivia HW3 out today Will cover HTTP, DNS, TCP TCP Milestone II coming up on Monday Make sure you sign

More information

Application Protocols and HTTP

Application Protocols and HTTP Application Protocols and HTTP 14-740: Fundamentals of Computer Networks Bill Nace Material from Computer Networking: A Top Down Approach, 6 th edition. J.F. Kurose and K.W. Ross Administrivia Lab #0 due

More information

ECE697AA Lecture 2. Today s lecture

ECE697AA Lecture 2. Today s lecture ECE697AA Lecture 2 Application Layer: HTTP Tilman Wolf Department of Electrical and Computer Engineering 09/04/08 Protocol stack Application layer Client-server architecture Example protocol: HTTP Demo

More information

Review of Previous Lecture

Review of Previous Lecture Review of Previous Lecture Network access and physical media Internet structure and ISPs Delay & loss in packet-switched networks Protocol layers, service models Some slides are in courtesy of J. Kurose

More information

CMSC 332 Computer Networking Web and FTP

CMSC 332 Computer Networking Web and FTP CMSC 332 Computer Networking Web and FTP Professor Szajda CMSC 332: Computer Networks Project The first project has been posted on the website. Check the web page for the link! Due 2/2! Enter strings into

More information

DATA COMMUNICATOIN NETWORKING

DATA COMMUNICATOIN NETWORKING DATA COMMUNICATOIN NETWORKING Instructor: Ouldooz Baghban Karimi Course Book: Computer Networking, A Top-Down Approach By: Kurose, Ross Introduction Course Overview Basics of Computer Networks Internet

More information

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 6 Application Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Application-layer protocols Application: communicating, distributed processes running in network hosts

More information

Application Level Protocols

Application Level Protocols Application Level Protocols 2 Application Level Protocols Applications handle different kinds of content e.g.. e-mail, web pages, voice Different types of content require different kinds of protocols Application

More information

CS144 Notes: Web Standards

CS144 Notes: Web Standards CS144 Notes: Web Standards Basic interaction Example: http://www.youtube.com - Q: what is going on behind the scene? * Q: What entities are involved in this interaction? * Q: What is the role of each entity?

More information

HTTP TRAFFIC CONSISTS OF REQUESTS AND RESPONSES. All HTTP traffic can be

HTTP TRAFFIC CONSISTS OF REQUESTS AND RESPONSES. All HTTP traffic can be 3 HTTP Transactions HTTP TRAFFIC CONSISTS OF REQUESTS AND RESPONSES. All HTTP traffic can be associated with the task of requesting content or responding to those requests. Every HTTP message sent from

More information

How to work with HTTP requests and responses

How to work with HTTP requests and responses How a web server processes static web pages Chapter 18 How to work with HTTP requests and responses How a web server processes dynamic web pages Slide 1 Slide 2 The components of a servlet/jsp application

More information

CS 43: Computer Networks. Layering & HTTP September 7, 2018

CS 43: Computer Networks. Layering & HTTP September 7, 2018 CS 43: Computer Networks Layering & HTTP September 7, 2018 Last Class: Five-layer Internet Model Application: the application (e.g., the Web, Email) Transport: end-to-end connections, reliability Network:

More information

CS 455/555 Spring 2011 Weigle

CS 455/555 Spring 2011 Weigle Homework 2 Application-Level Protocols Assigned: Tuesday, February 1, 2011 Due: Tuesday, February 15, 2011 at the beginning of class CS 455 100 points CS 555 112 points Note: All homework assignments must

More information

COSC 2206 Internet Tools. The HTTP Protocol

COSC 2206 Internet Tools. The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol http://www.w3.org/protocols/ What is TCP/IP? TCP: Transmission Control Protocol IP: Internet Protocol These network protocols provide a standard method for sending

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Application Layer 2-1 Some network apps e-mail web text messaging remote

More information

HTTP, circa HTTP protocol. GET /foo/bar.html HTTP/1.1. Sviluppo App Web 2015/ Intro 3/3/2016. Marco Tarini, Uninsubria 1

HTTP, circa HTTP protocol. GET /foo/bar.html HTTP/1.1. Sviluppo App Web 2015/ Intro 3/3/2016. Marco Tarini, Uninsubria 1 HTTP protocol HTTP, circa 1989 a resource «give me the HTML representation of thatresource» «ok, here» Client request GET /hello.txt Server response Hello, world! Client Server Http 1.1 Request line Client

More information

EECS 3214: Computer Network Protocols and Applications

EECS 3214: Computer Network Protocols and Applications EECS 3214: Computer Network Protocols and Applications Suprakash Datta Course page: http://www.eecs.yorku.ca/course/3214 Office: LAS 3043 Email: datta [at] cse.yorku.ca These slides are adapted from Jim

More information

HTTP Protocol and Server-Side Basics

HTTP Protocol and Server-Side Basics HTTP Protocol and Server-Side Basics Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming HTTP Protocol and Server-Side Basics Slide 1/26 Outline The HTTP protocol Environment Variables

More information

Computer Systems and Networks

Computer Systems and Networks University of the Pacific LECTURE 12: PYTHON BYTES, TCP/IP (LAB 08) Computer Systems and Networks Dr. Pallipuram (vpallipuramkrishnamani@pacific.edu) Today s Agenda Python exercises to simulate network

More information

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes Session 8 Deployment Descriptor 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/_status_codes

More information

CS193i Handout #18. HTTP Part 5

CS193i Handout #18. HTTP Part 5 HTTP Part 5 HTTP Under The Hood Write a little echo server that listens for HTTP requests on port 8181, and then just echoes it back, so we can see the details for the browser request... Echo Server Code

More information

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP Chapter 2: outline 2.1 principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP Application

More information

Application Layer: HTTP

Application Layer: HTTP Application Layer: HTTP EECS 3214 Slides courtesy of J.F Kurose and K.W. Ross, All Rights Reserved 23-Jan-18 1-1 Chapter 2: outline 2.1 principles of network applications 2.2 Web and HTTP 2.3 electronic

More information

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10 EE 586 Communication and Switching Networks (Fall 2010) Lecture 10 September 17 2010 1-1 Announcement Send me your group and get group ID HW3 (short) out on Monday Personal leave for next two weeks No

More information

HTTP Review. Carey Williamson Department of Computer Science University of Calgary

HTTP Review. Carey Williamson Department of Computer Science University of Calgary HTTP Review Carey Williamson Department of Computer Science University of Calgary Credit: Most of this content was provided by Erich Nahum (IBM Research) Introduction to HTTP http request http request

More information

HTTP Security. CSC 482/582: Computer Security Slide #1

HTTP Security. CSC 482/582: Computer Security Slide #1 HTTP Security CSC 482/582: Computer Security Slide #1 Topics 1. How HTTP works 2. HTTP methods, headers, and responses 3. URIs, URLs, and URNs 4. Statelessness 5. Cookies 6. More HTTP methods and headers

More information

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. Web Programming Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. 1 World-Wide Wide Web (Tim Berners-Lee & Cailliau 92)

More information

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP Chapter 2: outline 2.1 principles of network applications app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming

More information

COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS. Web Access: HTTP Mehmet KORKMAZ

COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS. Web Access: HTTP Mehmet KORKMAZ COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS Web Access: HTTP 16501018 Mehmet KORKMAZ World Wide Web What is WWW? WWW = World Wide Web = Web!= Internet Internet is a global system of interconnected computer

More information

Penetration Test Report

Penetration Test Report Penetration Test Report Feb 12, 2018 Ethnio, Inc. 6121 W SUNSET BLVD LOS angeles, CA 90028 Tel (888) 879-7439 ETHN.io Summary This document contains the most recent pen test results from our third party

More information

Matt Terwilliger. Networking Crash Course

Matt Terwilliger. Networking Crash Course Matt Terwilliger Networking Crash Course Before We Start Client/Server Model Client requests information from server over pre-established protocols. TCP/IP Model Application Layer Transport Layer Internet

More information

The HTTP Protocol HTTP

The HTTP Protocol HTTP The HTTP Protocol HTTP Copyright (c) 2013 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

powered by Series of Tubes Senator Ted Stevens talking about the Net Neutrality Bill Jul 17, powered by

powered by Series of Tubes Senator Ted Stevens talking about the Net Neutrality Bill Jul 17, powered by Page 1 Lecture Notes 1: The Internet and World Wide Web CSE 190 M (Web Programming), Spring 2007 University of Washington Reading: Sebesta Ch. 1 sections 1.1-1.5.2, 1.7-1.8.5, 1.8.8, 1.9 What is the Internet?

More information

CSC358 Week 2. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

CSC358 Week 2. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved CSC358 Week 2 Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright 1996-2016 J.F Kurose and K.W. Ross, All Rights Reserved Logistics Tutorial this Friday Assignment 1 will be out shortly

More information

Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa

Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa NET 331 Computer Networks Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa Reformatted slides from textbook Computer Networking a top-down appraoch, Fifth

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition ELEC / COMP 177 Fall 2012 Some slides from Kurose and Ross, Computer Networking, 5 th Edition Homework #1 Assigned today Due in one week Application layer: DNS, HTTP, protocols Recommend you start early

More information

World Wide Web. Before WWW

World Wide Web. Before WWW FEUP, João Neves World Wide Web Joao.Neves@fe.up.pt CAcer t WoT User Digitally signed by CAcert WoT User DN: cn=cacert WoT User, email=joao.neves@i nescporto.pt, email=b2d718a54c3 83ce1a9d48aa87e2ef 687ee8769f0

More information

Jeff Offutt SWE 642 Software Engineering for the World Wide Web

Jeff Offutt  SWE 642 Software Engineering for the World Wide Web Networking Basics Behind the World Wide Web Jeff Offutt http://www.cs.gmu.edu/~offutt/ SWE 642 Software Engineering for the World Wide Web Adapted from chapter 1 slides for : Web Technologies : A Computer

More information

How browsers talk to servers. What does this do?

How browsers talk to servers. What does this do? HTTP HEADERS How browsers talk to servers This is more of an outline than a tutorial. I wanted to give our web team a quick overview of what headers are and what they mean for client-server communication.

More information

Web Programming/Scripting: PHP and AJAX Refresher

Web Programming/Scripting: PHP and AJAX Refresher CS 312 Internet Concepts Web Programming/Scripting: PHP and AJAX Refresher Dr. Michele Weigle Department of Computer Science Old Dominion University mweigle@cs.odu.edu http://www.cs.odu.edu/~mweigle/cs312-f11

More information

Information Network Systems The application layer. Stephan Sigg

Information Network Systems The application layer. Stephan Sigg Information Network Systems The application layer Stephan Sigg Tokyo, November 15, 2012 Introduction 04.10.2012 Introduction to the internet 11.10.2012 The link layer 18.10.2012 The network layer 25.10.2012

More information

Assignment, part 2. Statement and concepts INFO-0010

Assignment, part 2. Statement and concepts INFO-0010 Assignment, part 2 Statement and concepts INFO-0010 Outline Statement Implementation of concepts Objective Mastermind game using HTTP GET and HTTP POST methods The platform Architecture Root page ("/")

More information

WWW Document Technologies

WWW Document Technologies WWW Document Technologies Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu/~spring Overview The Internet

More information

DNS and HTTP. A High-Level Overview of how the Internet works

DNS and HTTP. A High-Level Overview of how the Internet works DNS and HTTP A High-Level Overview of how the Internet works Adam Portier Fall 2017 How do I Google? Smaller problems you need to solve 1. Where is Google? 2. How do I access the Google webpage? 3. How

More information

C22: Browser & Web Server Communication

C22: Browser & Web Server Communication CISC 3120 C22: Browser & Web Server Communication Hui Chen Department of Computer & Information Science CUNY Brooklyn College 11/01/2017 CUNY Brooklyn College 1 Web Application Architecture Client apps

More information

jquery Basic HTTP communication

jquery Basic HTTP communication jquery Basic HTTP communication TAMZ 1 Lab 5 See: http://api.jquery.com/jquery.get/ http://api.jquery.com/jquery.post/ Application deployment Application has to be uploaded to a server Using of FTP/SCP/SFTP

More information

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers Session 9 Deployment Descriptor Http 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/http_status_codes

More information

Internet Architecture. Web Programming - 2 (Ref: Chapter 2) IP Software. IP Addressing. TCP/IP Basics. Client Server Basics. URL and MIME Types HTTP

Internet Architecture. Web Programming - 2 (Ref: Chapter 2) IP Software. IP Addressing. TCP/IP Basics. Client Server Basics. URL and MIME Types HTTP Web Programming - 2 (Ref: Chapter 2) TCP/IP Basics Internet Architecture Client Server Basics URL and MIME Types HTTP Routers interconnect the network TCP/IP software provides illusion of a single network

More information

Distributed Systems 1

Distributed Systems 1 95-702 Distributed Systems 1 Joe Intro Syllabus highlights 95-702 Distributed Systems 2 Understand the HTTP application protocol Request and response messages Methods / safety / idempotence Understand

More information

UR what? ! URI: Uniform Resource Identifier. " Uniquely identifies a data entity " Obeys a specific syntax " schemename:specificstuff

UR what? ! URI: Uniform Resource Identifier.  Uniquely identifies a data entity  Obeys a specific syntax  schemename:specificstuff CS314-29 Web Protocols URI, URN, URL Internationalisation Role of HTML and XML HTTP and HTTPS interacting via the Web UR what? URI: Uniform Resource Identifier Uniquely identifies a data entity Obeys a

More information

Project 1: Web Client and Server

Project 1: Web Client and Server Project 1: Web Client and Server Overview In this part of the project, your group will build a simple web client and a succession of servers to which it can connect. In addition you, will learn how to

More information

CSSE 460 Computer Networks Group Projects: Implement a Simple HTTP Web Proxy

CSSE 460 Computer Networks Group Projects: Implement a Simple HTTP Web Proxy CSSE 460 Computer Networks Group Projects: Implement a Simple HTTP Web Proxy Project Overview In this project, you will implement a simple web proxy that passes requests and data between a web client and

More information

Chapter 2: Application layer

Chapter 2: Application layer Chapter 2 Application Layer A note on the use of these ppt slides: Were making these slides freely available to all (faculty, students, readers). Theyre in PowerPoint form so you can add, modify, and delete

More information

Networking Fundamentals

Networking Fundamentals ECPE 170 Jeff Shafer University of the Pacific Networking Fundamentals 2 Lab Schedule AcEviEes Assignments Due Today Wednesday Apr 24 th Networking Fundamentals Lab 12 due by 11:59pm Last 3 days of class

More information

ICS 351: Today's plan. IPv6 routing protocols (summary) HTML HTTP web scripting languages certificates (review) cookies

ICS 351: Today's plan. IPv6 routing protocols (summary) HTML HTTP web scripting languages certificates (review) cookies ICS 351: Today's plan IPv6 routing protocols (summary) HTML HTTP web scripting languages certificates (review) cookies IPv6 routing almost the same routing protocols as for IPv4: RIPng, OSPFv6, BGP with

More information

Hypertext Transport Protocol

Hypertext Transport Protocol Hypertext Transport Protocol CSE 333 Summer 2018 Instructor: Hal Perkins Teaching Assistants: Renshu Gu William Kim Soumya Vasisht Administriia Section tomorrow: pthread tutorial/demo Followup exercise

More information

HTTP and Web Content Delivery

HTTP and Web Content Delivery HTTP and Web Content Delivery COS 461: Computer Networks Spring 2011 Mike Freedman hgp://www.cs.princeton.edu/courses/archive/spring11/cos461/ 2 Outline Layering HTTP HTTP conneclon management and caching

More information

WWW: the http protocol

WWW: the http protocol Internet apps: their protocols and transport protocols Application e-mail remote terminal access Web file transfer streaming multimedia remote file Internet telephony Application layer protocol smtp [RFC

More information

HTTP Server Application

HTTP Server Application 1 Introduction You are to design and develop a concurrent TCP server that implements the HTTP protocol in the form of what is commonly called a web server. This server will accept and process HEAD and

More information

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Lecture 7 Application Layer Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it Application-layer protocols Application: communicating, distributed processes running in network hosts

More information

Application Layer. Applications and application-layer protocols. Goals:

Application Layer. Applications and application-layer protocols. Goals: Application Layer Goals: Conceptual aspects of network application protocols Client paradigm Service models Learn about protocols by examining popular application-level protocols HTTP DNS 1 Applications

More information

Network Applications and the Web

Network Applications and the Web Network Applications and the Web Antonio Carzaniga Faculty of Informatics University of Lugano September 27, 2013 2005 2007 Antonio Carzaniga 1 General concepts for network applications Outline Client/server

More information

2- Application Level Protocols HTTP 1.0/1.1/2

2- Application Level Protocols HTTP 1.0/1.1/2 2- Application Level Protocols HTTP 1.0/1.1/2 HTTP, (HyperText Transfer Protocol) Basis for fetching Web pages request Network CSE 461 University of Washington 2 Sir Tim Berners-Lee (1955 ) Inventor of

More information

Project 2 Group Project Implementing a Simple HTTP Web Proxy

Project 2 Group Project Implementing a Simple HTTP Web Proxy Project 2 Group Project Implementing a Simple HTTP Web Proxy Overview: This is a group project. CPSC 460 students are allowed to form a group of 3-4 students (It is ok if you want to take it as an individual

More information

Computer Networks - A Simple HTTP proxy -

Computer Networks - A Simple HTTP proxy - Computer Networks - A Simple HTTP proxy - Objectives The intent of this assignment is to help you gain a thorough understanding of: The interaction between browsers and web servers The basics of the HTTP

More information

World Wide Web. World Wide Web - how it works. WWW usage requires a combination of standards and protocols DHCP TCP/IP DNS HTTP HTML MIME

World Wide Web. World Wide Web - how it works. WWW usage requires a combination of standards and protocols DHCP TCP/IP DNS HTTP HTML MIME World Wide Web WWW usage requires a combination of standards and protocols DHCP TCP/IP DNS HTTP HTML MIME World Wide Web - how it works User on a machine somewhere Server machine Being more specific...

More information

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model Networking Networking is concerned with the physical topology of two or more communicating entities and the logical topology of data transmission. Layered Model Systems communicate over a shared communication

More information

Web Client And Server

Web Client And Server Web Client And Server Project Part A Overview In this part of the project, you and your partner will build a simple web client and a succession of servers to which it can connect. The goal is to slowly

More information

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24 Proxying p.1/24 Proxying Why and How Alon Altman alon@haifux.org Haifa Linux Club Proxying p.2/24 Definition proxy \Prox"y\, n.; pl. Proxies. The agency for another who acts through the agent; authority

More information

Hypertext Transport Protocol

Hypertext Transport Protocol Hypertext Transport Protocol HTTP Hypertext Transport Protocol Language of the Web protocol used for communication between web browsers and web servers TCP port 80 HTTP - URLs URL Uniform Resource Locator

More information

Chapter 2 Application Layer

Chapter 2 Application Layer Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and

More information

UA-Tester.... or why Web-Application Penetration Testers are only getting half the story

UA-Tester.... or why Web-Application Penetration Testers are only getting half the story UA-Tester... or why Web-Application Penetration Testers are only getting half the story UA-Tester... or why Web-Application Penetration Testers are only getting half the story... or time to PIMP your tool!

More information

Getting Some REST with webmachine. Kevin A. Smith

Getting Some REST with webmachine. Kevin A. Smith Getting Some REST with webmachine Kevin A. Smith What is webmachine? Framework Framework Toolkit A toolkit for building RESTful HTTP resources What is REST? Style not a standard Resources == URLs http://localhost:8000/hello_world

More information

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies CNIT 129S: Securing Web Applications Ch 3: Web Application Technologies HTTP Hypertext Transfer Protocol (HTTP) Connectionless protocol Client sends an HTTP request to a Web server Gets an HTTP response

More information

CS4/MSc Computer Networking. Lecture 3: The Application Layer

CS4/MSc Computer Networking. Lecture 3: The Application Layer CS4/MSc Computer Networking Lecture 3: The Application Layer Computer Networking, Copyright University of Edinburgh 2005 Network Applications Examine a popular network application: Web Client-server architecture

More information

Policies to Resolve Archived HTTP Redirection

Policies to Resolve Archived HTTP Redirection Policies to Resolve Archived HTTP Redirection ABC XYZ ABC One University Some city email@domain.com ABSTRACT HyperText Transfer Protocol (HTTP) defined a Status code (Redirection 3xx) that enables the

More information

Project 2 Implementing a Simple HTTP Web Proxy

Project 2 Implementing a Simple HTTP Web Proxy Project 2 Implementing a Simple HTTP Web Proxy Overview: CPSC 460 students are allowed to form a group of up to 3 students. CPSC 560 students each must take it as an individual project. This project aims

More information

CS 410/510: Web Basics

CS 410/510: Web Basics CS 410/510: Web Basics Basics Web Clients HTTP Web Servers PC running Firefox Web Server Mac running Chrome Web Clients Basic Terminology HTML JavaScript Terminology Web page consists of objects Each object

More information

Network concepts introduction & wireshark

Network concepts introduction & wireshark Network concepts introduction & wireshark W0RKSH0P @KirilsSolovjovs Why am I doing this? Many people attending hacker conferences are not in fact experts, but come here to learn and have fun Opportunity

More information