URLs and HTTP. ICW Lecture 10 Tom Chothia



Similar documents
HTTP Protocol. Bartosz Walter

Hypertext for Hyper Techs

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

Web Programming. Robert M. Dondero, Ph.D. Princeton University

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Network Technologies

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

The Hyper-Text Transfer Protocol (HTTP)

Chapter 27 Hypertext Transfer Protocol

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

GET /FB/index.html HTTP/1.1 Host: lmi32.cnam.fr

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

By Bardia, Patit, and Rozheh

Internet Technologies 4-http. F. Ricci 2010/2011

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

People Data and the Web Forms and CGI CGI. Facilitating interactive web applications

CloudOYE CDN USER MANUAL

Internet Technologies Internet Protocols and Services

Data Communication I

1 Introduction: Network Applications

HTTP - METHODS. Same as GET, but transfers the status line and header section only.

Cyber Security Workshop Ethical Web Hacking

CONTENT of this CHAPTER

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

Lecture 11 Web Application Security (part 1)

World Wide Web. Before WWW

Chapter 1 Introduction to web development and PHP

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

CS615 - Aspects of System Administration

Cookies Overview and HTTP Proxies

Vodia PBX RESTful API (v2.0)

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

APACHE WEB SERVER. Andri Mirzal, PhD N

Modern Web Development From Angle Brackets to Web Sockets

Architecture of So-ware Systems HTTP Protocol. Mar8n Rehák

The Application Layer. CS158a Chris Pollett May 9, 2007.

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

Domain Name System (DNS)

Learning Outcomes. Networking. Sockets. TCP/IP Networks. Hostnames and DNS TCP/IP

Guide to Analyzing Feedback from Web Trends

What is Distributed Annotation System?

Module 45 (More Web Hacking)

Varnish Tips & Tricks, 2015 edition

Application Layer: HTTP and the Web. Srinidhi Varadarajan

Nuance Mobile Developer Program. HTTP Services for Nuance Mobile Developer Program Clients

Socket programming. Complement for the programming assignment INFO-0010

COMP 112 Assignment 1: HTTP Servers

10. Java Servelet. Introduction

JASPERREPORTS SERVER WEB SERVICES GUIDE

Application Monitoring using SNMPc 7.0

HTTP Fingerprinting and Advanced Assessment Techniques

Grandstream Networks, Inc. GXP2130/2140/2160 Auto-configuration Plug and Play

Exercises: FreeBSD: Apache and SSL: pre SANOG VI Workshop

Application layer Web 2.0

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

The Web History (I) The Web History (II)

CDN Operation Manual

HTTP Caching & Cache-Busting for Content Publishers

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP - Message Format. The Client/Server model is used:

7 Why Use Perl for CGI?

Introduction to ServerIron ADX Application Switching and Load Balancing. Module 6: Content Switching (CSW) Revision 0310

HOST EUROPE CLOUD STORAGE REST API DEVELOPER REFERENCE

Automated Vulnerability Scan Results

HTTP 1.1 Web Server and Client

DOSarrest Security Services (DSS) Version 4.0

Manual. Netumo NETUMO HELP MANUAL Copyright Netumo 2014 All Rights Reserved

Ethical Hacking as a Professional Penetration Testing Technique

How to Configure edgebox as a Web Server

For internal circulation of BSNL only

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Basic Internet programming Formalities. Hands-on tools for internet programming

A detailed walk through a CAS authentication

Instructor: Betty O Neil

Configuring Single Sign-on for WebVPN

Fachgebiet Technische Informatik, Joachim Zumbrägel

Introduction Les failles les plus courantes Les injections SQL. Failles Web. Maxime Arthaud. net7. Jeudi 03 avril 2014.

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Transport Layer Security Protocols

Introduction to Computer Security

Streaming Stored Audio & Video

CSI Lab 1 : Exercise Find the IP address of Or, another way:

Working With Virtual Hosts on Pramati Server

API. Application Programmers Interface document. For more information, please contact: Version 2.01 Aug 2015

Policy Guide Access Manager 3.1 SP5 January 2013

Configuring Health Monitoring

Media Gateway Controller RTP

Information Extraction Art of Testing Network Peripheral Devices

HTTP Response Splitting

Transcription:

URLs and HTTP ICW Lecture 10 Tom Chothia

This Lecture The two basic building blocks of the web: URLs: Uniform Resource Locators HTTP: HyperText Transfer Protocol

Uniform Resource Locators Many Internet systems use URLs, e.g. http://www.cs.bham.ac.uk/index.html Protocol Computer FilePath This URL refers to the file index.html on the computer www.cs.bham.ac.uk which should be accessed using http.

URLs aren't just for HTTP https://www.gmail.com/index.html ftp://ftp.funet.fi/pub/standards/rfc/ rfc959.txt rmi://68.45.12.7/process svn+ssh://svn.cwi.nl/projects

More complex URLs http://www.cs.bham.ac.uk:3080/index.html Port number ftp://tpc@my.ftp.bham.ac.uk/myfiles.txt Username Anchor http://en.wikipedia.org/wiki/uniform_resource_locator#syntax

URL syntax The most general URL has the syntax: protocol:// username:password@domain:port /filepathname?query_string#anchor All parts are options!

URLs in Java The java.net.url class does URLs in Java e.g.: URL myurl = new URL ( http:// www.cnn.com/index.html); myurl.gethost(); myurl.getport();

URLs in Java The URL knows the protocol therefore it can connect for you: InputStream = myurl.openstream(); More info at: http://java.sun.com/j2se/1.4.2/ docs/api/java/ net/url.html

HTTP HyperText Transfer Protocol Used to request and deliver webpages. Includes: Set of basic commands Header fields Status codes

GET and POST Key HTTP commands: GET: requests a resource, e.g. a webpage in HTTP POST: submits data to the server. e.g. from a form on a webpage.

OTHER COMMANDS HEAD like GET but only gets header PUT uploads resource to server DELETE deletes resource from server TRACE echoes back message OPTION returns supported HTTP CONNECT used for tunnelling TCP PATCH partially modify resource

Example laptop:~ laptop$ telnet www.cs.bham.ac.uk 80! Trying 147.188.192.42...! Connected to www.cs.bham.ac.uk.! Escape character is '^]'.! GET /index.php! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/ xhtml1-strict.dtd">! <html xmlns="http://www.w3.org/1999/xhtml" lang="en">! <head>!

Example laptop:~ laptop$ telnet www.google.com 80! Trying 173.194.37.104...! Connected to www.l.google.com.! Escape character is '^]'.! GET /! HTTP/1.0 302 Found! Location: http://www.google.co.uk/! <HTML><HEAD><meta http-equiv="content-type" content="text/ html;charset=utf-8">! <TITLE>302 Moved</TITLE></HEAD><BODY>! <H1>302 Moved</H1>! The document has moved!

Example laptop:~ laptop$ telnet www.google.co.uk 80! Trying 173.194.37.104...! Connected to www.l.google.com.! Escape character is '^]'.! GET /! HTTP/1.0 302 Found! Location: http://www.google.co.uk/! <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">! <TITLE>302 Moved</TITLE></HEAD><BODY>! <H1>302 Moved</H1>! The document has moved!

Headers and Bodies HTTP responses are made up of a header and a body: The header includes a reply code to tell the client what has happened. The body is the resource, e.g. the webpage

Status Codes 2--: Success 200 OK: the request worked 201 Created: request worked and server has created a new resource 204 No Context: request worked but there is nothing to return.

Status Codes 3--: Redirection 301 Moved Permanently: Website has moved 4--: Client Error 400 Bad Request: syntax error 401 Unauthorized: needs a cookie? 403 Forbidden: No access allowed

Status Codes 5--: Server Error 500 Internal Server Error: general error message 501 Not Implemented: command not supported Full list of status codes at: http://en.wikipedia.org/wiki/ List_of_HTTP_status_codes!

Headers fields These provide extra information, e.g. Host: <host name> is compulsory for HTTP 1.1, GET /index.php HTTP/1.1! Host: www.cs.bham.ac.uk!

Other Headers Fields Cookie: gives the cookie! Accept: data types client can handle, e.g. Accept: text/plain! Content-Length: length of message in bytes. Full list at: http://en.wikipedia.org/wiki/ List_of_HTTP_headers

Example laptop:~ laptop$ telnet www.google.co.uk 80! Trying 173.194.37.104...! Connected to www.l.google.com.! Escape character is '^]'.! GET / HTTP/1.1! Host:www.google.co.uk! HTTP/1.1 200 OK! Date: Wed, 03 Nov 2010 13:07:18 GMT! Expires: -1! Cache-Control: private, max-age=0! Content-Type: text/html; charset=iso-8859-1! Set-Cookie: PREF=ID=e5e59d5c56d4f722:FF=0:TM=1288789638:LM=1288789638:S =qb0mgmegvmqc7eu0; expires=fri, 02-Nov-2012 13:07:18 GMT; path=/; domain=.google.co.uk!

The burp Proxy The burp Proxy lets you monitor and pause an Internet connection. http://portswigger.net/burp/proxy.html Use it to look at your clients HTTP messages: 1. Run proxy (it opens port 8080), 2. Tell web client to use the proxy 3. See the messages

Conclusion Uniform Resource Locators (URLs): unqically name everything on the Internet. Name includes a lot of information about the resource: the protocol, the host, HyperText Transfer Protocol (HTTP): The protocol for getting webpages Use GET and POST Uses header fields status codes

Next Time: XML and Java XML tools. XML is the default file format of Internet systems. The next lecture will tell you what XML is and how to manipulate XML in Java.