Save 37% off PRO during our Black Friday Sale! »

Gotta Wear Shades: The Bright Future of HTTP (CoderFaire Nashville 2013)

Gotta Wear Shades: The Bright Future of HTTP (CoderFaire Nashville 2013)

Hypertext Transfer Protocol (HTTP) version 1.1 was published in June of 1999. Almost fifteen years have passed. In that time, the Web has seen many changes, but it would seem that, throughout this time, HTTP has remained fixed, stagnant. Yet, nothing could be further from the truth.

HTTP is evolving, like languages, through common usage and need. In this talk, Ben Ramsey discusses the past fifteen years of HTTP and how it has changed through the introduction of new methods and headers. He covers the current state of the protocol and the new HTTPbis Working Group that is drafting new RFCs to clarify HTTP. Finally, the talk will take a look at proposals for HTTP version 2 and what this means for web developers.

0c217b9a7dd0aa31ed40bd0f453727e1?s=128

Ben Ramsey
PRO

August 17, 2013
Tweet

Transcript

  1. Ben Ramsey Gotta Wear Shades The Bright Future of HTTP

  2. Hypertext Transfer Protocol

  3. 1991: HTTP/0.9

  4. 1992-95: HTTP/1.0 draft

  5. 1996: HTTP/1.0 RFC 1945

  6. 1997: HTTP/1.1 RFC 2068

  7. 1999: HTTP/1.1 RFC 2616

  8. 2005 2000

  9. 2010

  10. 2013

  11. HTTP Refresher Course

  12. Methods GET HEAD POST PUT DELETE OPTIONS TRACE CONNECT

  13. Status Codes 1xx: Informational 2xx: Successful 3xx: Redirection 4xx: Client

    error 5xx: Server error
  14. Selected Headers Accept Authorization Cache-Control Content-Type Date ETag If-Match If-Modified-Since

    Last-Modified Location Range Referer User-Agent WWW-Authenticate
  15. Extensions to HTTP/1.1

  16. WebDAV Web Distributed Authoring and Versioning RFC 4918

  17. WebDAV gives us the concept of collection resources.

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

  19. PATCH Allows a set of changes to be described, rather

    than the full entity body. RFC 5789
  20. 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
  21. 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" } ]
  22. More Status Codes Defines new codes for a variety of

    common uses, to improve interoperability, and to avoid confusion. RFC 6585
  23. 428 Precondition Required

  24. 429 Too Many Requests

  25. 431 Request Header Fields Too Large

  26. Web Linking Defines a framework for typed links not specific

    to an application, and introduced the Link header. RFC 5988
  27. GET /books/?page=2 HTTP/1.1 Host: example.org HTTP/1.1 200 OK Content-Type: text/html

    Link: <http://example.org/books/?page=1>; rel="previous"; title="Page 1", <http://example.org/books/?page=3>; rel="next"; title="Page 3"
  28. Prefer Header Defines a header used by the client to

    request certain server behaviors when processing a request. draft-snell-http-prefer-18
  29. 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
  30. 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
  31. Other Cookie, RFC 6265 Content-Disposition, RFC 6266 Web Origin, RFC

    6454 Deprecating “X-” , RFC 6648
  32. HTTPbis Working Group

  33. bis bis is a Latin adverb meaning “twice”

  34. Charter Charged with maintaining and developing the "core" specifications for

    HTTP . They have three deliverables.
  35. 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
  36. A document cataloguing the security properties of HTTP/1.1

  37. A document (or set of documents) that specifies HTTP/2.0, an

    improved binding of HTTP's semantics to an underlying transport.
  38. Superseding 1.1 Message Syntax and Routing Semantics and Content Conditional

    Requests Range Requests Caching Authentication
  39. Additional Method Registrations Auth Scheme Registrations

  40. 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.
  41. It also introduces unsolicited push of representations from servers to

    clients!
  42. It does not obsolete HTTP/1.1.

  43. It is based on the SPDY Protocol.

  44. Key Concepts Frames Streams Server Push

  45. Frames HTTP messages are encoded into frames. These frames are

    a more efficient serialization of the message.
  46. Streams A single connection may contain multiple concurrently active streams.

    They may be shared by the client or server.
  47. Server Push A server may send multiple resources to the

    client in response to a single request.
  48. So, where are we?

  49. What can I do now?

  50. HTTP/1.1

  51. SPDY

  52. HTTP/2.0

  53. Thank you Ben Ramsey benramsey.com @ramsey

  54. 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
  55. 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
  56. 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
  57. 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/
  58. 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/
  59. 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
  60. 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.