aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-06-27FastCgiRequest: Parse headers to a `conduit::HeaderMap`Teddy Wing
2020-06-27Create a wrapper struct for `fastcgi::Request`Teddy Wing
Trying out the Conduit API, as it seems like nice interface that I can plug the FastCGI server into. To do this, I need a server type, and some way to convert a `fastcgi::Request` into a `conduit::Request`. Doing this with a new local type that I can use to implement `conduit::RequestExt`.
2020-06-23run(): Convert `fastcgi::Request` to `http::Request`Teddy Wing
Build a new `http::Request` from the `fastcgi::Request` and pass it into the closure. Can't move `req`, so needed to change the `from` converter to take a reference. Update the example code to append the `http::Request` to a file for debugging and inspection.
2020-06-23From<fastcgi::Request>: Make a note to add the request bodyTeddy Wing
So far we only added metadata and headers to the request. We also need to include the body.
2020-06-23From<fastcgi::Request>: Convert HTTP headersTeddy Wing
The HTTP headers from `fastcgi` come with keys in the following format: "HTTP_USER_AGENT", "HTTP_ACCEPT_LANGUAGE". Since most headers use an uppercase first letter of a word with hyphen word separators, make the conversion by: 1. Removing the `HTTP_` prefix 2. Changing `_` to `-` 3. Making the first letter of each word uppercase using the Inflector crate
2020-06-23Start conversion from `fastcgi::Request` to `http::Request`Teddy Wing
Currently only converts the HTTP method and URI. Still need to convert HTTP headers.
2020-06-23Rename crate to `fcgi`Teddy Wing
2020-06-23Ideas for APITeddy Wing
I want a wrapper for `fastcgi::run()` that uses `http::Request` and `http::Response`. Add a `lighttpd.conf` to test the FastCGI. Print FastCGI params to give me an idea of what the request looks like.
2020-06-22Cargo.toml: Add 'fastcgi' and 'http' dependenciesTeddy Wing
2020-06-22Initialise new Rust v1.44.1 projectTeddy Wing
Created with: $ cargo init --lib