Skip to content

Commit d1e2219

Browse files
authored
fix: language tweaks in documentation (#201)
* Language tweaks in SECURITY.md * Language tweaks in AUTHORS, CHANGELOG.md * Language tweaks in README.md Most of these changes are minimal, but in a few places I took liberties to normalize phrasing in parallel sections or remove a redundant sentence.
1 parent 6a01ebe commit d1e2219

File tree

4 files changed

+58
-59
lines changed

4 files changed

+58
-59
lines changed

AUTHORS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Here we try to keep track of contributors to this crate, if this is your first
2-
time participating on this repostory, please add your name and email for contact here.
1+
Here we try to keep track of contributors to this crate. If this is your first
2+
time participating on this project, please add your name and email for contact here.
33

44
Esteban Borai <[email protected]>

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Unreleased
22

3-
> **Warning**: This is a manually maintained Changelog, for an automatically maintained version which is provided on every release along with binaries and source code, please visit the [Releases Page](https://github.com/EstebanBorai/http-server/releases).
3+
> **Warning**: This is a manually maintained Changelog. For an automatically maintained version which is provided on every release along with binaries and source code, please visit the [Releases Page](https://github.com/EstebanBorai/http-server/releases).
44
55
<Empty>
66

README.md

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
cargo install http-server
2929
```
3030

31-
Check for the installation to be successful.
31+
Verify successful installation.
3232

3333
```bash
3434
http-server --help
3535
```
3636

37-
Expect the following output
37+
Expect the following output:
3838

3939
```
4040
USAGE:
@@ -65,12 +65,12 @@ ARGS:
6565
<root-dir> Directory to serve files from [default: ./]
6666
```
6767

68-
> If you find this output is out-of-date, don't hesitate to open a [PR here][1].
68+
> If you find this output is out of date, don't hesitate to open a [PR here][1].
6969
7070
## Configuration
7171

7272
When running the server with no options or flags provided, a set of default
73-
configurations will be set, you can always change this behavior by either
73+
configurations will be used. You can always change this behavior by either
7474
creating your own config with the [Configuration TOML](https://github.com/EstebanBorai/http-server/blob/main/fixtures/config.toml) file
7575
or by providing CLI arguments described in the [usage](#usage) section.
7676

@@ -106,15 +106,15 @@ Name | Short | Long | Description
106106
--- | --- | --- | ---
107107
Cross-Origin Resource Sharing | N/A | `--cors` | Enable Cross-Origin Resource Sharing allowing any origin
108108
GZip Compression | N/A | `--gzip` | Enable GZip compression for responses
109-
Graceful Shutdown | N/A | `--graceful-shutdown` | Waits for all requests to fulfill before shutting down the server
110-
Help | N/A | `--help` | Prints help information
111-
Logger | `-l` | `--logger` | Prints HTTP request and response details to stdout
112-
Version | `-V` | `--version` | Prints version information
113-
Verbose | `-v` | `--verbose` | Prints output to console
109+
Graceful Shutdown | N/A | `--graceful-shutdown` | Wait for all requests to be fulfilled before shutting down the server
110+
Help | N/A | `--help` | Print help information
111+
Logger | `-l` | `--logger` | Print HTTP request and response details to stdout
112+
Version | `-V` | `--version` | Print version information
113+
Verbose | `-v` | `--verbose` | Print output to console
114114

115115
### Options
116116

117-
Options receives a value and have support for default values as well.
117+
Options receive a value and support default values as well.
118118

119119
```
120120
http-server --host 127.0.0.1
@@ -124,28 +124,28 @@ Name | Short | Long | Description | Default Value
124124
--- | --- | --- | --- | ---
125125
Host | `-h` | `--host` | Address to bind the server | `127.0.0.1`
126126
Port | `-p` | `--port` | Port to bind the server | `7878`
127-
Configuration File | `-c` | `--config` | Specifies a configuration file. [Example](https://github.com/EstebanBorai/http-server/blob/main/fixtures/config.toml) | N/A
127+
Configuration File | `-c` | `--config` | Configuration file. [Example](https://github.com/EstebanBorai/http-server/blob/main/fixtures/config.toml) | N/A
128128
TLS | N/A | `--tls` | Enable TLS for HTTPS connections. Requires a Certificate and Key. [Reference](#tls-reference) | N/A
129129
TLS Ceritificate | N/A | `--tls-cert` | Path to TLS certificate file. **Depends on `--tls`** | `cert.pem`
130130
TLS Key | N/A | `--tls-key` | Path to TLS key file. **Depends on `--tls`** | `key.rsa`
131131
TLS Key Algorithm | N/A | `--tls-key-algorithm` | Algorithm used to generate certificate key. **Depends on `--tls`** | `rsa`
132-
Username | N/A | `--username` | Specify the username to validate using basic authentication | N/A
133-
Password | N/A | `--password` | Specify the password to validate using basic authentication. **Depends on `--username`** | N/A
132+
Username | N/A | `--username` | Username to validate using basic authentication | N/A
133+
Password | N/A | `--password` | Password to validate using basic authentication. **Depends on `--username`** | N/A
134134
Proxy | N/A | `--proxy` | Proxy requests to the provided URL | N/A
135135

136136
## Request Handlers
137137

138-
This HTTP Proxy supports different _Request Handlers_, this determines how each
139-
incoming HTTP request must be handled, they can't be combinable so you must
138+
This HTTP Proxy supports different _Request Handlers_ which determine how each
139+
incoming HTTP request is handled. They can't be combined, you must
140140
choose one based on your needs.
141141

142-
- [File Server](#file-server-handler)
142+
- [File Server](#file-server-handler) _default_
143143
- [Proxy](#proxy-handler)
144144

145145
### File Server Handler
146146

147-
Useful for serving files in the provided directory. Navigation is scoped to the
148-
specified directory, if no directory is provided the CWD will be used.
147+
Serves files from the provided directory. Navigation is scoped to the
148+
specified directory. If no directory is provided the CWD will be used.
149149

150150
> This is the default behavior for the HTTP server.
151151
@@ -154,22 +154,22 @@ specified directory, if no directory is provided the CWD will be used.
154154
Proxies requests to the provided URL. The URL provided is used as the base URL
155155
for incoming requests.
156156

157-
## References
157+
## Reference
158158

159159
The following are some relevant details on features supported by this HTTP Server
160-
solution that may be of the interest of the user.
160+
that may be of interest to the user.
161161

162162
### Compression
163163

164-
Even when compression is supported, by default the server will not compress any
164+
Even though compression is supported, by default the server will not compress any
165165
HTTP response contents.
166+
You must specify the compression configuration you want to use, in the
167+
configuration file or on the command line.
166168

167-
You must specify the compression configuration you want to use, as of today
168-
the server only supports compression with the GZip algorithm, but `brotli` is
169-
also planed to be supported, that's why theres two ways to configure this
170-
server to use compression.
169+
As of today the server only supports compression with the GZip algorithm, but
170+
`brotli` support is also planned.
171171

172-
The following MIME types will be skipped from compression:
172+
The following MIME types are never compressed:
173173

174174
- `application/gzip`
175175
- `application/octet-stream`
@@ -180,8 +180,8 @@ The following MIME types will be skipped from compression:
180180

181181
#### The Configuration File's Compression Section
182182

183-
As suppport for other compression algorithms is planned to be provided in the
184-
future, the configuration file already supports compression settings.
183+
As future support for other compression algorithms is planned,
184+
the configuration file already supports compression settings.
185185

186186
```toml
187187
[compression]
@@ -198,16 +198,16 @@ http-server --gzip
198198

199199
### TLS (HTTPS)
200200

201-
The TLS solution supported for this HTTP Server is built with [rustls](https://github.com/ctz/rustls)
201+
The TLS solution supported for this HTTP Server is built with the [rustls](https://github.com/ctz/rustls)
202202
crate along with [hyper-rustls](https://github.com/ctz/hyper-rustls).
203203

204204
When running with TLS support you will need:
205205

206206
- A certificate
207-
- A RSA Private Key for such certificate
207+
- A matching RSA Private Key for the certificate
208208

209209
A script to generate certificates and keys is available here [tls-cert.sh](./docs/tls-cert.sh).
210-
This script relies on `openssl`, so make sure you have it installed in your system.
210+
This script relies on `openssl`, so make sure you have it installed on your system.
211211

212212
Run `http-server` as follows:
213213

@@ -217,19 +217,18 @@ http-server --tls --tls-cert <PATH TO YOUR CERTIFICATE> --tls-key <PATH TO YOUR
217217

218218
### Cross-Origin Resource Sharing (CORS)
219219

220-
This HTTP Server brings support to CORS headers _out of the box_.
221-
Based on the headers you want to provide to your HTTP Responses, 2
220+
This HTTP Server supports CORS headers _out of the box_.
221+
Based on the headers you want to provide in your HTTP Responses, two
222222
different methods for CORS configuration are available.
223223

224-
By providing the `--cors` option to the `http-server`, CORS headers
224+
By providing the `--cors` option to `http-server`, CORS headers
225225
will be appended to every HTTP Response, allowing any origin.
226226

227227
For more complex configurations, like specifying an origin, a set of allowed
228228
HTTP methods and more, you should specify the configuration via the configuration
229229
TOML file.
230230

231-
The following example shows all the options available, these options are
232-
mapped to the server configuration during initialization.
231+
The following example shows all the available options.
233232

234233
```toml
235234
[cors]
@@ -259,10 +258,10 @@ password = "Appleseed"
259258

260259
### Proxy
261260

262-
The HTTP Server is able to proxy requests to an specified URL.
261+
The HTTP Server is able to proxy requests to a specified URL.
263262

264-
By using the proxy the FileExplorer wont be available, the proxy is considered
265-
a _Request Handler_.
263+
When using the proxy, the FileExplorer won't be available, as the proxy is
264+
an alternate _Request Handler_.
266265

267266
The config TOML file can be used to provide proxy configurations:
268267

@@ -275,13 +274,13 @@ url = "https://example.com"
275274

276275
The following roadmap list features to provide for the version `v1.0.0`.
277276

278-
This roadmap still open for suggestions, if you find that theres a missing
279-
feature in this list, you would like to work on or expect for the first
280-
stable release, please contact software editors by opening an issue or a
277+
This roadmap is still open for suggestions. If you find that there's a missing
278+
feature in this list, that you would like to work on or expect for the first
279+
stable release, please contact the software editors by opening an issue or a
281280
discussion.
282281

283282
If you want to contribute to one of these, please make sure
284-
theres an issue tracking the feature and ping me. Otherwise
283+
there's an issue tracking the feature and ping me. Otherwise
285284
open an issue to be assigned and track the progress there.
286285

287286
- [x] Logging
@@ -351,7 +350,7 @@ git tag -a <version> -m <message>
351350
git tag -a v0.1.0 -m "First release"
352351
```
353352

354-
> Tags must follow semver conventions
353+
> Tags must follow semver conventions.
355354
> Tags must be prefixed with a lowercase `v` letter.
356355
357356
Then push tags as follows:
@@ -362,8 +361,8 @@ git push origin main --follow-tags
362361

363362
## Contributing
364363

365-
Every contribution to this project is welcome. Feel free to open a pull request,
366-
an issue or just by starting this project.
364+
Every contribution to this project is welcome. Feel free to open a pull request or
365+
an issue. Just by using this project you're helping it grow. Thank you!
367366

368367
## License
369368

SECURITY.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# Security Policy
22

3-
This Command-Line HTTP Server is intended to be as configurable as possible,
4-
thus security concerns may vary based on the configuration provided on runtime.
3+
This command-line HTTP Server is intended to be as configurable as possible,
4+
thus security concerns may vary based on the configuration provided at runtime.
55

66
### Data Security
77

88
If you are running this server to send/receive sensitive data, please make sure
99
you configure TLS support and provide a certificate.
1010

11-
Follow on [TLS/HTTPS configuration][1] for more details.
11+
See [TLS/HTTPS configuration][1] for more details.
1212

1313
### Host Security
1414

1515
This software is primary written in Rust. Rust is well known for its security
16-
principles by design, access to invalid memory addresses or invalid references
17-
are mostly reduced. Even though these warranties many not apply in some
16+
principles. By design, access to invalid memory addresses or invalid references
17+
are mostly eliminated. Even though these warranties many not apply in some
1818
use cases (those where `unsafe` code is introduced), this software tends to
19-
avoid the usage of these code blocks. If you find any space for replacement
20-
of `unsafe` code and you are not sure on how could you apply it, please don't
21-
hesitate on contacting software editors by opening an issue or a pull request.
19+
avoid the usage of these code blocks. If you find an opportunity to eliminate
20+
`unsafe` code and you are not sure how to apply it, please don't hesitate to
21+
contact the software editors by opening an issue or a pull request.
2222

2323
## Reporting a Vulnerability
2424

25-
If you have found any issue using this solution, please don't hesitate to send
26-
an email to [email protected].
25+
If you have found any security issue using this software, please don't
26+
hesitate to send an email to [email protected].
2727

2828
[1]: https://github.com/EstebanBorai/http-server#tls-https

0 commit comments

Comments
 (0)