Skip to content

Commit f22fbd4

Browse files
committed
chore(release): crate release v0.4.0
1 parent 8d0725d commit f22fbd4

File tree

4 files changed

+70
-4
lines changed

4 files changed

+70
-4
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
<Empty>
44

5+
<a name="v0.4.0"></a>
6+
## v0.4.0 (2021-06-30)
7+
8+
> Requires Rust: rustc 1.52.1 (9bc8c42bb 2021-05-09)
9+
10+
#### Features
11+
12+
* GZip Compression for HTTP response body
13+
* Local IP Address is printed when the server is binded to `0.0.0.0`.
14+
15+
#### Improvements
16+
17+
* The `static_file` was renamed to `file_server` for a more accurate name
18+
* Benchmarks for de-facto configuration, CORS and GZip as part of CI
19+
* DHAT (Dynamic Heap Allocatio Tool) Profiling supported as part of CI
20+
21+
#### Fixes
22+
23+
* URI with query parameters are now supported
24+
525
<a name="v0.3.4"></a>
626
## v0.3.4 (2021-06-11)
727

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "http-server"
3-
version = "0.3.4"
3+
version = "0.4.0"
44
authors = ["Esteban Borai <[email protected]>"]
55
edition = "2018"
66
description = "Simple and configurable command-line HTTP server"

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@ Check for the installation to be successful.
3434
http-server --help
3535
```
3636

37+
## Configuration
38+
39+
When running the server with no options or flags provided, a set of default
40+
configurations will be set, you can always change this behavior by either
41+
creating your own config with the [Configuration TOML](https://github.com/EstebanBorai/http-server/blob/main/fixtures/config.toml) file
42+
or by providing CLI arguments described in the [usage](#usage) section.
43+
44+
Name | Description | Default
45+
--- | --- | ---
46+
Host | Address to bind the server | `127.0.0.1`
47+
Port | Port to bind the server | `7878`
48+
Root Directory | The directory to serve files from | `CWD`
49+
File Explorer UI | A File Explorer UI for the directory configured as the _Root Directory_ | Enabled
50+
Configuration File | Specifies a configuration file. [Example](https://github.com/EstebanBorai/http-server/blob/main/fixtures/config.toml) | Disabled
51+
HTTPS (TLS) | HTTPS Secure connection configuration. Refer to [TLS (HTTPS)](https://github.com/EstebanBorai/http-server#tls-https) reference | Disabled
52+
CORS | Cross-Origin-Resource-Sharing headers support. Refer to [CORS](https://github.com/EstebanBorai/http-server#cross-origin-resource-sharing-cors) reference | Disabled
53+
Compression | GZip compression for HTTP Response Bodies. Refer to [Compression](https://github.com/EstebanBorai/http-server#compression) reference | Disabled
54+
Verbose | Print server details when running. This doesn't include any logging capabilities. | Disabled
55+
3756
## Usage
3857

3958
```
@@ -81,14 +100,41 @@ solution that may be of the interest of the user.
81100

82101
### Compression
83102

84-
Compression with GZip encoding is supported, to enable it you must provide the `compression`
85-
section to the server configuration file.
103+
Even when compression is supported, by default the server will not compress any
104+
HTTP response contents.
105+
106+
You must specify the compression configuration you want to use, as of today
107+
the server only supports compression with the GZip algorithm, but `brotli` is
108+
also planed to be supported, that's why theres two ways to configure this
109+
server to use compression.
110+
111+
The following MIME types will be skipped from compression:
112+
113+
- `application/gzip`
114+
- `application/octet-stream`
115+
- `application/wasm`
116+
- `application/zip`
117+
- `image/*`
118+
- `video/*`
119+
120+
#### The Configuration File's Compression Section
121+
122+
As suppport for other compression algorithms is planned to be provided in the
123+
future, the configuration file already supports compression settings.
86124

87125
```toml
88126
[compression]
89127
gzip = true
90128
```
91129

130+
#### The `--gzip` flag
131+
132+
Provide the `--gzip` argument to the server when executing it.
133+
134+
```bash
135+
http-server --gzip
136+
```
137+
92138
### TLS (HTTPS)
93139

94140
The TLS solution supported for this HTTP Server is built with [rustls](https://github.com/ctz/rustls)

0 commit comments

Comments
 (0)