C22: Browser & Web Server Communication

Similar documents
COSC 2206 Internet Tools. The HTTP Protocol

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

C24: Web API: Passing Arguments and Parsing Returns

WEB TECHNOLOGIES CHAPTER 1

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

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

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

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

Notes beforehand... For more details: See the (online) presentation program.

Web Architecture Part 3

Applications & Application-Layer Protocols: The Web & HTTP

CSCI-1680 WWW Rodrigo Fonseca

Project 2 Implementing a Simple HTTP Web Proxy

Application Level Protocols

Jeff Offutt SWE 642 Software Engineering for the World Wide Web

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

Project 2 Group Project Implementing a Simple HTTP Web Proxy

Web Architecture and Technologies

ECE697AA Lecture 2. Today s lecture

How the Internet Works

World Wide Web, etc.

Homework 2 50 points. CSE422 Computer Networking Spring 2018

Computer Networks - A Simple HTTP proxy -

CSE 333 Lecture HTTP

DATA COMMUNICATOIN NETWORKING

Introduction to Internet, Web, and TCP/IP Protocols SEEM

The World Wide Web. Internet

HTTP Protocol and Server-Side Basics

Lecture Overview : Computer Networking. Applications and Application-Layer Protocols. Client-Server Paradigm

Outline of Lecture 3 Protocols

CSCI-1680 WWW Rodrigo Fonseca

1.1 A Brief Intro to the Internet

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

C25: Creating Web Services using the Spring Framework

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

TCP/IP Networking Basics

Advanced Java Programming. Networking

2. Introduction to Internet Applications

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

HyperText Transfer Protocol

HTTP Server Application

1.1 A Brief Intro to the Internet

World Wide Web. Before WWW

The HTTP Protocol HTTP

CS631 - Advanced Programming in the UNIX Environment

HTTP HyperText Transfer Protocol

CSE 333 Lecture HTTP

3. WWW and HTTP. Fig.3.1 Architecture of WWW

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

Web History. Systemprogrammering 2006 Föreläsning 9 Web Services. Internet Hosts. Web History (cont) 1945: 1989: Topics 1990:

s642 web security computer security adam everspaugh

Applications & Application-Layer Protocols: The Web & HTTP

Giving credit where credit is due

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

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

Web. Computer Organization 4/16/2015. CSC252 - Spring Web and HTTP. URLs. Kai Shen

Distributed Systems 1

CS 43: Computer Networks. HTTP September 10, 2018

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

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

Web Client And Server

Backend Development. SWE 432, Fall 2017 Design and Implementation of Software for the Web

COMPUTER NETWORK. Homework #1. Due Date: March 29, 2017 in class

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

Web Technology. COMP476 Networked Computer Systems. Hypertext and Hypermedia. Document Representation. Client-Server Paradigm.

Policies to Resolve Archived HTTP Redirection

Black Box DCX3000 / DCX1000 Using the API

TCP/IP Networking An Example

Computer Systems and Networks

Application Protocols and HTTP

Unraveling the Mysteries of J2EE Web Application Communications

HTTP Authentication API

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

How to work with HTTP requests and responses

CORS Attacks. Author: Milad Khoshdel Blog: P a g e. CORS Attacks

Hypertext Transport Protocol

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

CSI 32. Lecture 22. Chapter A Network Primer 16.2 Writing a Basic Client

Outline Computer Networking. HTTP Basics (Review) How to Mark End of Message? (Review)

Announcements Fawzi Emad, Computer Science Department, UMCP

Protocols. Application Layer FTP, HTTP, SSH, IMAP. Transport Layer TCP, UDP. Internet Layer IP. Link Layer Ethernet, WiFi

2/13/2014. A protocol is an agreed-upon convention that defines how communication occurs between two (or more?) endpoints

Threat Landscape 2017

Yioop Full Historical Indexing In Cache Navigation. Akshat Kukreti

CSCI 136: Fundamentals of Computer Science II Keith Vertanen Copyright 2012

1.1 A Brief Intro to the Internet

Project 1: Web Client and Server

Networking. INFO/CSE 100, Spring 2006 Fluency in Information Technology.

Introduction to Cisco TV CDS Software APIs

HTTP (HyperText Transfer Protocol)

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred.

Lecture Overview. Lecture 3 Design Philosophy & Applications. Internet Architecture. Priorities

Lesson 1 Key-Terms Meanings: Web Connectivity of Devices and Devices Network

Internet Content Distribution

Web Security, Part 2

Web Search An Application of Information Retrieval Theory

C18: Network Fundamentals and Reliable Sockets

Hypertext Transport Protocol

CS 455/555 Spring 2011 Weigle

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

Transcription:

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 HTTP Application Server & Serverside Apps Web (HTTP) Servers Database servers (relational and nonrelational) Web Client Web and Application Servers Storage System (Database Server) 11/01/2017 CUNY Brooklyn College 2

URI, URL, and URN Defined in RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax (obsoletes RFCs 2396, 2732) Updated by RFC 6874 and RFC 7320. URI URN URL 11/01/2017 CUNY Brooklyn College 3

URI Uniform Resource Identifier A means for identify a resource A sequence of characters from a very limited set The basic Latin alphabet, digits, and a few special characters 11/01/2017 CUNY Brooklyn College 4

URI: Examples These are examples of URIs ftp://ftp.is.co.za/rfc/rfc1808.txt http://www.ietf.org/rfc/rfc2396.txt ldap://[2001:db8::7]/c=gb?objectclass?one mailto:john.doe@example.com news:comp.infosystems.www.servers.unix tel:+1-816-555-1212 telnet://192.0.2.16:80/ urn:oasis:names:specification:docbook:dtd:xml:4.1.2 11/01/2017 CUNY Brooklyn College 5

URI: Syntax Syntax URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] foo://example.com:8042/over/there?name=ferret#nose \_/ \ /\ / \ / \ / scheme authority path query fragment /\ / \ urn:example:animal:ferret:nose 11/01/2017 CUNY Brooklyn College 6

URL Universal Resource Locator A subset of URIs Identity the resource Locate the resource by describing its primary access mechanism in the URI (e.g., its network "location"). 11/01/2017 CUNY Brooklyn College 7

Locate Resource/Object on the Web with URL Example: http://www.sci.brooklyn.cuny.edu/course/cisc3120/lecture/cisc3120_c21.pdf#page=3 Access mechanism: network protocol HTTP Protocol: HTTP Port: 80 Hostname: www.sci.brooklyn.cuny.edu Name of the resource: /course/cisc3120/lecure/cisc3120_c21.pdf (optional) Query: none for this example (optional) Name fragment: #page=3 11/01/2017 CUNY Brooklyn College 8

More Discussion on URI and URL See Java API java.net.uri and java.net.url Convert URI to URL URI has a method called tourl public URL tourl() throws MalformedURLException 11/01/2017 CUNY Brooklyn College 9

URI Decode and Encode Decode and encode RFC 2396 defines an escaping scheme (e.g., what if the name has space, :, or / etc URI s tourl method does encoding http://foo.com/hello world/ http://foo.com/hello%20world Two classes java.net.urldecoder and java.net.urlencoder 11/01/2017 CUNY Brooklyn College 10

Example: Locate a Resource on the Web See URLReader in the network directory of the sampleprograms repository What do you observe? 11/01/2017 CUNY Brooklyn College 11

HTTP Hypertext Transfer Protocol Simple request-response protocol layered on TCP/IP Where does it belong in the OSI 7-layer model and the TCP/IP model? 11/01/2017 CUNY Brooklyn College 12

HTTP: An Application Layer Protocol 11/01/2017 CUNY Brooklyn College 13

HTTP Message Exchange A typical scene involves a request and response cycle A client establishes a connection to the sever The client sends a HTTP request along the connection to the server The server replies the client with a response The client reads from the connection the response from the web serve 11/01/2017 CUNY Brooklyn College 14

body header Example: HTTP/1.1 Request Header and Body GET /index.html HTTP/1.1 Request method, URN, protocol version User-Agent: Java Web Client Host: localhost:61235 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Two blank lines 11/01/2017 CUNY Brooklyn College 15

HTTP Request Methods GET HEAD PUT POST fetch a URL fetch information about a URL store to an URL send form data to a URL and get a response back DELETE delete a URL Most frequently used methods are GET and POST 11/01/2017 CUNY Brooklyn College 16

body header Example: HTTP/1.1 Response Header and body HTTP/1.1 200 OK protocol version, status code, status message Date: Thu, 16 Nov 2017 22:06:47 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 mod_wsgi/3.4 Python/2.7.5 Last-Modified: Tue, 11 Jan 2000 21:02:46 GMT ETag: "17b-35ddc09a30980" Accept-Ranges: bytes Content-Length: 379 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=utf-8 <HTML> </HTML> Blank line 11/01/2017 CUNY Brooklyn College 17

HTTP Evolution HTTP 0.9 1.0: initial development; 1991 1996 Allows only one outstanding request at a time on a given TCP connection HTTP/1.1: standardized in 1997 HTTP/2: standardized in 2015 Aimed reduce latency Allows interleaving requests & responses on the same connection, reduces header size, supports prioritization of requests 11/01/2017 CUNY Brooklyn College 18

Some Recent Development Web becomes an application platform Secure Web traffic becomes dominant Handshake latencies TCP: 1 round-trip delay; TLS: 2 round-trip delay Langley et al., 2017 11/01/2017 CUNY Brooklyn College 19

Question? How web browser and Web server communication? How do we locate a resource on the Web? Evolving to HTTP/2 11/01/2017 CUNY Brooklyn College 20