Slide 1

Slide 1 text

Ben Ramsey Gotta Wear Shades The Bright Future of HTTP

Slide 2

Slide 2 text

Hypertext Transfer Protocol

Slide 3

Slide 3 text

1991: HTTP/0.9

Slide 4

Slide 4 text

1992-95: HTTP/1.0 draft

Slide 5

Slide 5 text

1996: HTTP/1.0 RFC 1945

Slide 6

Slide 6 text

1997: HTTP/1.1 RFC 2068

Slide 7

Slide 7 text

1999: HTTP/1.1 RFC 2616

Slide 8

Slide 8 text

2005 2000

Slide 9

Slide 9 text

2010

Slide 10

Slide 10 text

2013

Slide 11

Slide 11 text

HTTP Refresher Course

Slide 12

Slide 12 text

Methods GET HEAD POST PUT DELETE OPTIONS TRACE CONNECT

Slide 13

Slide 13 text

Status Codes 1xx: Informational 2xx: Successful 3xx: Redirection 4xx: Client error 5xx: Server error

Slide 14

Slide 14 text

Selected Headers Accept Authorization Cache-Control Content-Type Date ETag If-Match If-Modified-Since Last-Modified Location Range Referer User-Agent WWW-Authenticate

Slide 15

Slide 15 text

Extensions to HTTP/1.1

Slide 16

Slide 16 text

WebDAV Web Distributed Authoring and Versioning RFC 4918

Slide 17

Slide 17 text

WebDAV gives us the concept of collection resources.

Slide 18

Slide 18 text

Collection: http://example.org/books/ Item: http://example.org/books/1984

Slide 19

Slide 19 text

PATCH Allows a set of changes to be described, rather than the full entity body. RFC 5789

Slide 20

Slide 20 text

OPTIONS /books/1984 HTTP/1.1 Host: example.org HTTP/1.1 200 OK Allow: GET, HEAD, PUT, PATCH, OPTIONS, DELETE Accept-Patch: application/json-patch+json, text/diff

Slide 21

Slide 21 text

PATCH /books/1984 HTTP/1.1 Host: example.org Content-Length: 188 Content-Type: application/json-patch+json [ { "op": "replace", "path": "/isbn", "value": "978-0452262935" }, { "op": "add", "path": "/asin", "value": "0452262933" } ]

Slide 22

Slide 22 text

More Status Codes Defines new codes for a variety of common uses, to improve interoperability, and to avoid confusion. RFC 6585

Slide 23

Slide 23 text

428 Precondition Required

Slide 24

Slide 24 text

429 Too Many Requests

Slide 25

Slide 25 text

431 Request Header Fields Too Large

Slide 26

Slide 26 text

Web Linking Defines a framework for typed links not specific to an application, and introduced the Link header. RFC 5988

Slide 27

Slide 27 text

GET /books/?page=2 HTTP/1.1 Host: example.org HTTP/1.1 200 OK Content-Type: text/html Link: ; rel="previous"; title="Page 1", ; rel="next"; title="Page 3"

Slide 28

Slide 28 text

Prefer Header Defines a header used by the client to request certain server behaviors when processing a request. draft-snell-http-prefer-18

Slide 29

Slide 29 text

POST /collection HTTP/1.1 Host: example.org Content-Type: text/plain Prefer: respond-async {Data} HTTP/1.1 202 Accepted Location: http://example.org/collection/ 123 Preference-Applied: respond-async

Slide 30

Slide 30 text

POST /collection HTTP/1.1 Host: example.org Content-Type: text/plain Prefer: return=minimal {Data} HTTP/1.1 201 Created Location: http://example.org/collection/ 123 Preference-Applied: return=minimal

Slide 31

Slide 31 text

Other Cookie, RFC 6265 Content-Disposition, RFC 6266 Web Origin, RFC 6454 Deprecating “X-” , RFC 6648

Slide 32

Slide 32 text

HTTPbis Working Group

Slide 33

Slide 33 text

bis bis is a Latin adverb meaning “twice”

Slide 34

Slide 34 text

Charter Charged with maintaining and developing the "core" specifications for HTTP . They have three deliverables.

Slide 35

Slide 35 text

A document (or set of documents) that is suitable to supersede RFC 2616 as the definition of HTTP/1.1 and move RFC 2817 to Historic status

Slide 36

Slide 36 text

A document cataloguing the security properties of HTTP/1.1

Slide 37

Slide 37 text

A document (or set of documents) that specifies HTTP/2.0, an improved binding of HTTP's semantics to an underlying transport.

Slide 38

Slide 38 text

Superseding 1.1 Message Syntax and Routing Semantics and Content Conditional Requests Range Requests Caching Authentication

Slide 39

Slide 39 text

Additional Method Registrations Auth Scheme Registrations

Slide 40

Slide 40 text

HTTP/2.0 A new message encapsulation to enable efficient use of network resources and reduced latency through header field compression and multiple concurrent messages on the same connection.

Slide 41

Slide 41 text

It also introduces unsolicited push of representations from servers to clients!

Slide 42

Slide 42 text

It does not obsolete HTTP/1.1.

Slide 43

Slide 43 text

It is based on the SPDY Protocol.

Slide 44

Slide 44 text

Key Concepts Frames Streams Server Push

Slide 45

Slide 45 text

Frames HTTP messages are encoded into frames. These frames are a more efficient serialization of the message.

Slide 46

Slide 46 text

Streams A single connection may contain multiple concurrently active streams. They may be shared by the client or server.

Slide 47

Slide 47 text

Server Push A server may send multiple resources to the client in response to a single request.

Slide 48

Slide 48 text

So, where are we?

Slide 49

Slide 49 text

What can I do now?

Slide 50

Slide 50 text

HTTP/1.1

Slide 51

Slide 51 text

SPDY

Slide 52

Slide 52 text

HTTP/2.0

Slide 53

Slide 53 text

Thank you Ben Ramsey benramsey.com @ramsey

Slide 54

Slide 54 text

Resources HTTP/0.9 (1991): http://www.w3.org/Protocols/HTTP/AsImplemented.html HTTP/1.0 (draft 1992): http://www.w3.org/Protocols/HTTP/HTTP2.html HTTP/1.0 (draft 1994): http://tools.ietf.org/html/draft-fielding-http-spec-00 HTTP 1.0 (May 1996): http://tools.ietf.org/html/rfc1945 HTTP/1.1 (Jan 1997): http://tools.ietf.org/html/rfc2068 (obsoleted by RFC 2616) HTTP/1.1 (Jun 1999): http://tools.ietf.org/html/rfc2616

Slide 55

Slide 55 text

Resources WebDAV: http://www.webdav.org/ Well-known URIs: http://tools.ietf.org/html/rfc5785 Additional HTTP Status Codes: http://tools.ietf.org/html/rfc6585 Web Linking: http://tools.ietf.org/html/rfc5988 Deprecating the "X-" Prefix header: http://tools.ietf.org/html/rfc6648 Use of Content-Disposition: http://tools.ietf.org/html/rfc6266

Slide 56

Slide 56 text

Resources HTTP Header Fields Registrations: http://tools.ietf.org/html/rfc4229 Prefer Header: http://tools.ietf.org/html/draft-snell-http-prefer-18 Well-known URI Registry: http://www.iana.org/assignments/well-known-uris/ Method Header Fields Registry: http://www.iana.org/assignments/message-headers/ HTTP Status Codes Registry: https://www.iana.org/assignments/http-status-codes/ JSON Patch: http://tools.ietf.org/html/rfc6902

Slide 57

Slide 57 text

Resources HTTPbis: http://datatracker.ietf.org/wg/httpbis/ HTTP Method Registrations: http://datatracker.ietf.org/doc/draft-ietf-httpbis-method-registrations/ HTTP Auth Scheme Registrations: http://datatracker.ietf.org/doc/draft-ietf-httpbis-authscheme- registrations/

Slide 58

Slide 58 text

Resources HTTP/1.1 Message Syntax and Routing: http://datatracker.ietf.org/doc/draft-ietf-httpbis-p1-messaging/ HTTP/1.1 Semantics and Content: http://datatracker.ietf.org/doc/draft-ietf-httpbis-p2-semantics/ HTTP/1.1 Conditional Requests: http://datatracker.ietf.org/doc/draft-ietf-httpbis-p4-conditional/ HTTP/1.1 Range Requests: http://datatracker.ietf.org/doc/draft-ietf-httpbis-p5-range/ HTTP/1.1 Caching: http://datatracker.ietf.org/doc/draft-ietf-httpbis-p6-cache/ HTTP/1.1 Authentication: http://datatracker.ietf.org/doc/draft-ietf-httpbis-p7-auth/

Slide 59

Slide 59 text

Resources HTTP/2.0: http://datatracker.ietf.org/doc/draft-ietf-httpbis-http2/ HTTP/2.0 Header Compression: http://datatracker.ietf.org/doc/draft-ietf-httpbis-header-compression/ Web Socket Protocol: http://tools.ietf.org/html/rfc6455 SPDY Protocol: http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00 Apache mod_spdy: https://code.google.com/p/mod-spdy/ Nginx SPDY Module: http://nginx.org/en/docs/http/ngx_http_spdy_module.html

Slide 60

Slide 60 text

Gotta Wear Shades: The Bright Future of HTTP Copyright © Ben Ramsey. Some rights reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported. For uses not covered under this license, please contact the author. Ramsey, Ben. “Gotta Wear Shades: The Bright Future of HTTP.” CoderFaire. Nashville School of Law, Nashville, TN. 17 August 2013. Conference Presentation.