-@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
-@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
-@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
+@import url(https://fonts.googleapis.com/css?family=Open+Sans);
+@import url(https://fonts.googleapis.com/css?family=Muli);
+@import url(https://fonts.googleapis.com/css?family=Inconsolata);
body {
- font-family: 'Droid Serif';
+ font-family: 'Open Sans';
}
-h1, h2, h3 {
- font-family: 'Yanone Kaffeesatz';
+.remark-slide-content h1,
+.remark-slide-content h2,
+.remark-slide-content h3 {
+ font-family: Muli;
font-weight: normal;
}
+.remark-slide-content h2 {
+ font-size: 40px;
+}
+.remark-slide-content h3 {
+ font-size: 30px;
+}
.remark-slide-content li {
line-height: 2em;
.remark-code, .remark-inline-code {
- font-family: Inconsolata, 'Ubuntu Mono';
+ font-family: Inconsolata, monospace;
}
.remark-code {
border-radius: 5px;
---
-### Hypertext Transfer Protocol
+### **H**yper**t**ext **T**ransfer **P**rotocol
--
- Invented by Tim Berners-Lee in 1989, first specified as [HTTP 0.9](https://www.w3.org/Protocols/HTTP/AsImplemented.html) in 1991.
---
-### Common Gateway Interface
+### **C**ommon **G**ateway **I**nterface
--
- Created by the NCSA in 1993.
.condensed[
.col[
-- AUTH_TYPE
-- CONTENT_LENGTH
-- CONTENT_TYPE
-- GATEWAY_INTERFACE
-- PATH_INFO
-- PATH_TRANSLATED
-- QUERY_STRING
-- REMOTE_ADDR
-- REMOTE_HOST
+- `AUTH_TYPE`
+- `CONTENT_LENGTH`
+- `CONTENT_TYPE`
+- `GATEWAY_INTERFACE`
+- `PATH_INFO`
+- `PATH_TRANSLATED`
+- `QUERY_STRING`
+- `REMOTE_ADDR`
+- `REMOTE_HOST`
]
.col[
-- REMOTE_IDENT
-- REMOTE_USER
-- REQUEST_METHOD
-- SCRIPT_NAME
-- SERVER_NAME
-- SERVER_PORT
-- SERVER_PROTOCOL
-- SERVER_SOFTWARE
+- `REMOTE_IDENT`
+- `REMOTE_USER`
+- `REQUEST_METHOD`
+- `SCRIPT_NAME`
+- `SERVER_NAME`
+- `SERVER_PORT`
+- `SERVER_PROTOCOL`
+- `SERVER_SOFTWARE`
- other "protocol-specific" variables
]
]
.condensed[
.col[
-- Content-Type
-- Location
-- Status
+- `Content-Type`
+- `Location`
+- `Status`
- other "protocol-specific" header fields
]
]
.condensed[
.col[
-- HTTP_ACCEPT
-- HTTP_ACCEPT_ENCODING
-- HTTP_ACCEPT_LANGUAGE
-- HTTP_CACHE_CONTROL
-- HTTP_CONNECTION
-- HTTP_DNT
-- HTTP_HOST
-- HTTP_USER_AGENT
-- PATH_INFO
-- QUERY_STRING
-- REMOTE_ADDR
-- REMOTE_PORT
-- REQUEST_METHOD
-- REQUEST_URI
-- SCRIPT_NAME
+- `HTTP_ACCEPT`
+- `HTTP_ACCEPT_ENCODING`
+- `HTTP_ACCEPT_LANGUAGE`
+- `HTTP_CACHE_CONTROL`
+- `HTTP_CONNECTION`
+- `HTTP_DNT`
+- `HTTP_HOST`
+- `HTTP_USER_AGENT`
+- `PATH_INFO`
+- `QUERY_STRING `
+- `REMOTE_ADDR`
+- `REMOTE_PORT`
+- `REQUEST_METHOD`
+- `REQUEST_URI`
+- `SCRIPT_NAME`
]
.col[
-- SERVER_NAME
-- SERVER_PORT
-- SERVER_PROTOCOL
-- psgi.errors
-- psgi.input
-- psgi.multiprocess
-- psgi.multithread
-- psgi.nonblocking
-- psgi.run_once
-- psgi.streaming
-- psgi.url_scheme
-- psgi.version
-- psgix.harakiri
-- psgix.input.buffered
-- psgix.io
+- `SERVER_NAME`
+- `SERVER_PORT`
+- `SERVER_PROTOCOL`
+- `psgi.errors`
+- `psgi.input`
+- `psgi.multiprocess`
+- `psgi.multithread`
+- `psgi.nonblocking`
+- `psgi.run_once`
+- `psgi.streaming`
+- `psgi.url_scheme`
+- `psgi.version`
+- `psgix.harakiri`
+- `psgix.input.buffered`
+- `psgix.io`
]
]
.condensed[
.col[
-- .highlight[HTTP_ACCEPT]
-- .highlight[HTTP_ACCEPT_ENCODING]
-- .highlight[HTTP_ACCEPT_LANGUAGE]
-- .highlight[HTTP_CACHE_CONTROL]
-- .highlight[HTTP_CONNECTION]
-- .highlight[HTTP_DNT]
-- .highlight[HTTP_HOST]
-- .highlight[HTTP_USER_AGENT]
-- .highlight[PATH_INFO]
-- .highlight[QUERY_STRING ]
-- .highlight[REMOTE_ADDR]
-- .highlight[REMOTE_PORT]
-- .highlight[REQUEST_METHOD]
-- .highlight[REQUEST_URI]
-- .highlight[SCRIPT_NAME]
+- .highlight[`HTTP_ACCEPT`]
+- .highlight[`HTTP_ACCEPT_ENCODING`]
+- .highlight[`HTTP_ACCEPT_LANGUAGE`]
+- .highlight[`HTTP_CACHE_CONTROL`]
+- .highlight[`HTTP_CONNECTION`]
+- .highlight[`HTTP_DNT`]
+- .highlight[`HTTP_HOST`]
+- .highlight[`HTTP_USER_AGENT`]
+- .highlight[`PATH_INFO`]
+- .highlight[`QUERY_STRING `]
+- .highlight[`REMOTE_ADDR`]
+- .highlight[`REMOTE_PORT`]
+- .highlight[`REQUEST_METHOD`]
+- .highlight[`REQUEST_URI`]
+- .highlight[`SCRIPT_NAME`]
]
.col[
-- .highlight[SERVER_NAME]
-- .highlight[SERVER_PORT]
-- .highlight[SERVER_PROTOCOL]
-- psgi.errors
-- psgi.input
-- psgi.multiprocess
-- psgi.multithread
-- psgi.nonblocking
-- psgi.run_once
-- psgi.streaming
-- psgi.url_scheme
-- psgi.version
-- psgix.harakiri
-- psgix.input.buffered
-- psgix.io
+- .highlight[`SERVER_NAME`]
+- .highlight[`SERVER_PORT`]
+- .highlight[`SERVER_PROTOCOL`]
+- `psgi.errors`
+- `psgi.input`
+- `psgi.multiprocess`
+- `psgi.multithread`
+- `psgi.nonblocking`
+- `psgi.run_once`
+- `psgi.streaming`
+- `psgi.url_scheme`
+- `psgi.version`
+- `psgix.harakiri`
+- `psgix.input.buffered`
+- `psgix.io`
]
]
.condensed[
.col[
-- HTTP_ACCEPT
-- HTTP_ACCEPT_ENCODING
-- HTTP_ACCEPT_LANGUAGE
-- HTTP_CACHE_CONTROL
-- HTTP_CONNECTION
-- HTTP_DNT
-- HTTP_HOST
-- HTTP_USER_AGENT
-- PATH_INFO
-- QUERY_STRING
-- REMOTE_ADDR
-- REMOTE_PORT
-- REQUEST_METHOD
-- REQUEST_URI
-- SCRIPT_NAME
+- `HTTP_ACCEPT`
+- `HTTP_ACCEPT_ENCODING`
+- `HTTP_ACCEPT_LANGUAGE`
+- `HTTP_CACHE_CONTROL`
+- `HTTP_CONNECTION`
+- `HTTP_DNT`
+- `HTTP_HOST`
+- `HTTP_USER_AGENT`
+- `PATH_INFO`
+- `QUERY_STRING `
+- `REMOTE_ADDR`
+- `REMOTE_PORT`
+- `REQUEST_METHOD`
+- `REQUEST_URI`
+- `SCRIPT_NAME`
]
.col[
-- SERVER_NAME
-- SERVER_PORT
-- SERVER_PROTOCOL
-- .highlight[psgi.errors]
-- .highlight[psgi.input]
-- .highlight[psgi.multiprocess ]
-- .highlight[psgi.multithread ]
-- .highlight[psgi.nonblocking ]
-- .highlight[psgi.run_once ]
-- .highlight[psgi.streaming]
-- .highlight[psgi.url_scheme]
-- .highlight[psgi.version]
-- .highlight[psgix.harakiri]
-- .highlight[psgix.input.buffered]
-- .highlight[psgix.io]
+- `SERVER_NAME`
+- `SERVER_PORT`
+- `SERVER_PROTOCOL`
+- .highlight[`psgi.errors`]
+- .highlight[`psgi.input`]
+- .highlight[`psgi.multiprocess`]
+- .highlight[`psgi.multithread`]
+- .highlight[`psgi.nonblocking`]
+- .highlight[`psgi.run_once`]
+- .highlight[`psgi.streaming`]
+- .highlight[`psgi.url_scheme`]
+- .highlight[`psgi.version`]
+- .highlight[`psgix.harakiri`]
+- .highlight[`psgix.input.buffered`]
+- .highlight[`psgix.io`]
]
]
### [`XSRFBlock`](https://metacpan.org/pod/Plack::Middleware::XSRFBlock)
```perl
-enable 'XSRFBlock';
+enable 'XSRFBlock', cookie_options => { httponly => 1 };
```
- Blocking cross-site request forgery couldn't be easier.
![CPAN](img/cpan.png)
]
-## Plack modules on the CPAN in July 2016
+## Plack modules in July 2016
**10** `Plack-Handler-*` distributions
## Parting Thoughts
-- You should write middleware!
+- PSGI also specifies a way to delay or stream responses to the server.
+
+???
+- It's kind of complicated, but you can read the spec to learn more.
+- Read the source code of various apps and middlewares to see how it works in practice.
+
+--
+- There are tons of great apps and middleware on the CPAN.
+
+--
+- Consider writing some of your app as a middleware.
???
- The concept and implementation of middleware is cool.
- Sessions
- Rate limiters
---
-- PSGI also specifies a way to delay or stream responses to the server.
-
-???
-- It's kind of complicated, but you can read the spec to learn more.
-- Read the source code of various apps and middlewares to see how it works in practice.
-
---
class: center, middle