HTTP: Just the bits every dev should know about!

With your host:

Tod Hansmann

(TodPunk)

Problem Solver

tod@phonejanitor.com

Oh, just browser things

The bits we need to know:

  • DNS, sigh
  • The HTTP Protocols
  • SO many requests
  • Security?
  • State. Mmmmm.

The Request!

POST / HTTP/1.1
Host: www.todandlorna.com
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: text/plain
Cookie: ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=dGhhbnNtYW5uOjE0NDgzOTA5NjA3NzM6MmY2YmQ5OTM1ZWRhM2UzNDVmM2FhOGYzOWRhNDJhYjA=; JSESSIONID=zuglfkccjxha; player-7468616e736d616e6e=25; __utma=62441267.1070405918.1410462107.1410462107.1410462107.1
Origin: http://home.todandlorna.com:3306
Referer: http://home.todandlorna.com:3306/subsonic/playQueue.view?
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.125 Safari/537.36

The Response!

HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 1069
Content-Type: text/html
Date: Wed, 08 Jul 2015 19:54:28 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.7 (Ubuntu)
Vary: Accept-Encoding
X-Powered-By: PHP/5.5.9-1ubuntu4.9

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
		<title>Tod and Lorna.com</title>
<script type="text/javascript">

ETCETCETC!!!!

The Response!


HTTP/1.1 304 Not Modified
Connection: Keep-Alive
Date: Wed, 08 Jul 2015 19:53:50 GMT
ETag: "5af-3dd2a69c4c4c0"
Keep-Alive: timeout=5, max=99
Server: Apache/2.4.7 (Ubuntu)

HTTPS:

  • TLS, not SSL
  • Bonus headaches!
  • Not a magic bullet

HTTPS for devs?

  • More for system administraion
  • What info are you sending, are you sure?

What HTTP Is and Isn't

  • Requests for documents!
  • Stateless!
  • Text! (mostly)
  • Slow!
  • Not meant for apps (we're rebels!)
  • Lots of recent changes (not HTML, HTTP)
  • Server responsibilities, like headers (no!)

Thoughts? Q&A

Made with Slides.com