static-web-server

A cross-platform, high-performance and asynchronous web server for static files-serving. ⚡

APACHE-2.0 License

Downloads
17.2K
Stars
1.2K
Committers
33

Bot releases are visible (Hide)

static-web-server - v2.5.0

Published by github-actions[bot] over 2 years ago

Fixes

  • 3df07aa Bugfix dependency updates including Tokio, libc, h2, tracing, brotli and other crates. (also 5f9f9f9, 3df07aa, 0c1a6c1)

Features

  • 3224261 Configurable grace period support after a SIGTERM. PR #80 resolves #79 suggested by @jtackaberry. See docs for more details.

Refactorings

  • 4caf0aa Log info entry after CTRL + C on Windows.
static-web-server - v1.19.0

Published by github-actions[bot] over 2 years ago

Updates

9ceab19 Security/bug-fixes updates for OpenSSL, structopt, libc and other dependencies (also ae2c70d).
561175e Alpine 3.14 Docker image.

Fixes

70a16f8 to_string applied to a type that implements Display.

static-web-server - v2.4.0

Published by github-actions[bot] almost 3 years ago

Fixes

  • fd227b3 Bugfix dependency updates including Tokio, futures, http, syn, libc and other crates. (also fd227b3, 7becd4e).

Refactorings

  • 5926c9b Trailing slash checking and redirection for directory requests. PR #74 resolves #73 suggested by @knyzorg.

Features

  • ac8f87c Alpine 3.14 Docker images.
static-web-server - v2.3.0

Published by github-actions[bot] almost 3 years ago

Fixes

  • 366e6a9 Security/bug fixes dependency updates including Hyper, Tokio, h2, libc, futures and other crates. (Also dfe87c7, 1231b50).

Features

  • 688d1b2 Directory listing sorting columns and opt-in default sorting by Name, Last Modified and File Size in ascending/descending order via the new --directory-listing-order option. More details on directory listing documentation. PR #71 resolves #68 suggested by @igoro00.
static-web-server - v1.18.2

Published by github-actions[bot] almost 3 years ago

Updates

  • c310671 Security/bug-fixes updates for OpenSSL, libc and other dependencies.
static-web-server - v2.2.0

Published by github-actions[bot] almost 3 years ago

Fixes

  • c264f2f Update dependencies including tokio, libc and hyper http headers (also e127a1f).

Features

  • 0a02da3 Graceful Shutdown support for HTTP/1 - HTTP/2 servers by default. PR #62 resolves #61 suggested by @pdfrod.

Refactorings

  • 6f10ef1 Disable ANSI for tracing logs on Windows in order to display characters correctly.
  • 17ceec0 Log Basic Authentication info.

Docs

static-web-server - v1.18.1

Published by github-actions[bot] almost 3 years ago

Updates

  • 1bccef4 Update dependencies including OpenSSL, libc, ctrlc security/bug fixes and related crates (also 7178d5d, 250a47f).

Refactorings

  • 247869f Fix Rust 2018 Edition idioms
  • 1686daf Use Rust 1.56.0 (2021 Edition) on CI
static-web-server - v2.1.0

Published by github-actions[bot] almost 3 years ago

Fixes

  • 5f3842b Update dependencies including Hyper, Tokio, h2, futures, tracing bug/security fixes and related crates (also 5528bcb, dc98fbb).
  • 62e98c6 aarch64-unknown-linux-musl build fails using Rust nightly.

Features

  • abc76a8 Basic HTTP Authentication support via the new --basic-auth option. PR #55 resolves #53 suggested by @bjornharrtell.

Refactorings

Docs

  • f89c5c9 Describe Basic HTTP Authentication feature.
  • a6d0e53 Minor general description improvements.
static-web-server - v2.0.3

Published by github-actions[bot] about 3 years ago

Fixes

  • 5de5874 Update dependencies including Hyper, Tokio, http, futures, tracing bug fixes and related crates (also 1c6c873 34efa49, 6fb832b)

Refactorings

  • b2f09ab Remove optional extra Docker volume /public of scratch and alpine images. PR #52 resolves #51 reported by @bergi9.
  • 906106f Remove never read struct field on Cors module.
  • 6f7a6bc Fix Rust edition idioms.

Tests

  • 166e869 More Cors test cases.
static-web-server - v2.0.2

Published by github-actions[bot] about 3 years ago

Fixes

  • ab83e2a Update dependencies including hyper, h2, httparse bug fixes. tokio leak fix and related crates (also adb8ca6)
static-web-server - v1.18.0

Published by github-actions[bot] about 3 years ago

Updates

  • 806a276 Update dependencies including OpenSSL, httparse and related crates.

Refactorings

  • c9e7222 Cross-platform ctrl-c signal handling including Windows support.
  • 3c7d9f6 Remove needless borrow on server module.

Docs

static-web-server - v2.0.1

Published by github-actions[bot] about 3 years ago

Fixes

  • 2459ec4 Return incorrect first bytes range when final bytes are requested. For example a request using Range: bytes=-10 header returned incorrectly the first 10 bytes rather than the last 10 ones.

Updates

Refactorings

  • 8fc1812 Remove needless borrow on static file and handle modules.
  • 27f5687 UTF-8 for default Docker index.html file.
  • ffb2e54 Update Rust stable to 1.54.0 on CI.

Tests

  • 5cdcffc More directory listing test cases.
  • c7e8ec9 More static files test cases.
  • 37f2371 More static file methods and compression test cases.
  • dd7f995 More static file test cases during request handling.

Docs

  • f389cbc Minor badges and link updates.
static-web-server - v2.0.0

Published by github-actions[bot] over 3 years ago

The second major stable release is finally available after around half a year of work.
It introduces notable changes including new features, performance improvements and new targets support like ARM64 and OSes like FreeBSD.

This version was re-written almost from the scratch on top of Hyper and Tokio runtime which give us the Rust asynchronous ability by default and latest HTTP/1 & HTTP/2 implementation improvements.
However it still try to keep the same principles of its first version: lightness and easy to use. Therefore a migration to this new version should not be a big deal.

Your feedback is very appreciated.

Features

This list only shows new features not present in previous v1.

  • Static Web Server is now asynchronous by default powered by latest Hyper and Tokio.
  • It supports opt-in GZip, Deflate and Brotli compression based on Accept-Encoding header for text-based web files only.
  • HTTP/2 + TLS support (via --http2 option).
  • Security headers like STS, CSP and others for HTTP/2 by default.
  • Customizable number of worker threads (via --threads-multiplier option).
  • Redesigned directory listing (via --directory-listing option).
  • Cache control header is now optional (via --cache-control-headers).
  • Ability to accept a socket listener as a file descriptor for use in sandboxing and on-demand applications (E.g systemd). Via --fd option. Thanks to @tim-seoss.
  • Binaries for various i686/x86_64 targets (Linux/Windows/FreeBSD) and ARM/ARM64 (Linux/Macos M1)

For the full list of features, options details and usage please check it out the README file.

Breaking changes

This major version has few breaking changes.
However a migration should not represent a problem. Please have in mind the following changes:

  • The server supports now only a root directory path (via --root or its equivalent env) so an assets path option is no longer required.
  • Cache control headers are applied to assets in an arbitrary manner. See src/control_headers.rs for more details.
  • OpenSSL TLS for HTTP/1 is no longer supported instead for the HTTP/2 + TLS (via --http2 option) the server uses h2 which is on top of Rustls. It means that instead of using a .p12 or .pfx file you can now use only a certificate file along with its private key. More details on README file.

The rest of known options are equivalent to v1 except the new ones of course.
However it's worth to always recommend to test this server update first with your applications on a development environment or similar.

Please see the full list of options with their details on the README file.


Changes after the last v2.0.0-beta.7 release:

Performance

  • 157ade1 Decrease few allocations during 404/50x error page responses.
  • 941572c Reduce few allocations on control headers checking.

Features

  • 012b626 Cache control headers optional via --cache-control-headers.

Refactorings

  • 5aa587f Minor syntax improvements on static file module.
  • 45988db Minor style updates on server module.

Docs

static-web-server - v2.0.0-beta.7

Published by github-actions[bot] over 3 years ago

Seventh and last beta release v2.0.0-beta.7 with notable changes.

Updates

  • 9e90b3843a1ce6f47721f520f97708e384768014 Hyper 0.14.10 dependency update which fixes two security issues.

Features

  • 432b591277de8556b2708757eee4281f2310e041 FreeBSD i686 and x86_64 targets support.
    • i686-unknown-freebsd
    • x86_64-unknown-freebsd

Find the binaries for new targets attached to this release.

Performance

  • 70a76ed58b63579802887051e01eb8580549bdaf Optimize root path of static file module which increases performance and reduces memory usage.

Codebase

  • 2aa130dd0bb126df615d167e9593f236a79f5eda Move source ./public to ./docker dir.
static-web-server - v2.0.0-beta.6

Published by github-actions[bot] over 3 years ago

Sixth beta release v2.0.0-beta.6 with notable changes.

Updates

  • 33040d0e90dc275946c606b771796064bfc5243a Update dependencies including latest Tokio and related crates (also a4ef322bc69b7493086057bb9ed297028186b756, 26b3fbcd40f66f5a653925d125a895b702135cf1, e07c3339f0b7a6f69a44a37d8f9cfb89900e36ba).

Fixes

  • a1b78366eed0bf97516b745964d2183be02a13b9 Missing Content-Type header for directory listing index and error pages.

Features

  • e2bf778b5991929c45b4ae5201fa14d4da6110a6 Windows 64-bit target support. It also improves Ctrl+C signal handling cross-platform. Note Windows ARM64 is in stand by temporarily, see README file for more details.
  • 0fa5015774fdfbf536ede7ffa28a6804e176f21b Windows/Linux i686 targets support and one Windows x86_64
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • i686-unknown-linux-musl
    • x86_64-pc-windows-gnu
  • 59cf8bc5ec768cf95371ff983fc68b0e3f4abd57 More text-based mime types for compression.
    • text/csv
    • text/calendar
    • text/markdown
    • text/x-yaml
    • text/x-toml
    • application/rtf
    • application/xhtml+xml

Find the binaries for new targets attached to this release and all targets supported also described in the README file.

Refactorings

  • 2a699e48a7f51e891066f6c2c4aeed3d57c98677 Follow symlinks during directory listing, displaying the index page properly for symlinks that points to directories or files.
  • b4f1bccb4fa9774f6802f40661961b91b216a89e Prefer stabilized Poll::map_err on compression stream.
  • 55ffd06be14e74f086a244d25b2c4eca94ba35a5 Handle potencial panic for 404/50x error page responses.
  • 920acb2888e3ebbef09eb7a3bd220b643233e56c Prefer to_owned() for string literals over to_string() in some cases.
  • c0dca6eb9c0210b00db936e63f82883414e34abc Improve directory path scanning when directory listing.
  • 0ed62870245f5687db62c5b1d5b718865298d704 Auto compression error result logging.
  • 87b8744d8f74770e10a1559a259f16c5e0f907da Minor server config info updates.
  • b025536692c81565fd4358ec5ee84cb4132475d8 Minor code styling and docs changes.

Release notes

FreeBSD i686/x86_64 binaries are coming in next and last beta release which is very close to the final v2 releasing.

static-web-server - v1.17.1

Published by github-actions[bot] over 3 years ago

Fixes

  • f9765867681f9cc6645a0d4b35fa118d011d5b73 Fix static file base path not resolved (canonicalized) properly. For example when uri paths map to symlinks on file system.
  • 35d5a1eec45b6a181bb22316fcef9a1ef57a2a0c Fix missing server version env of "scratch" Dockerfile.

Updates

  • 1fc9d7f18438e82a315281d36bcf0924cc60b086 Update dependencies 30.06.2021.

Docs

  • 8979292d8b4acc94844ac706d104417a3d15989a Describe current supported targets.

Refactorings

  • 34cd35b4a82ecb3b971588ea9779b77ca448a261 Minor config project updates.
static-web-server - v2.0.0-beta.5

Published by github-actions[bot] over 3 years ago

Fifth beta release v2.0.0-beta.5 with notable changes.

Updates

  • 5343a2205e75201480b953531e1ca1b61b9b0766 Update dependencies including latest Hyper, Tokio and related crates. (also bcb84932d13851e4562a7614dbc12039e371466e, e51f969988a264fc40123517190d59788d83729b, e51f969988a264fc40123517190d59788d83729b)

Features

  • c96af53fb6d80a985da926baadbf17ca94fef40d Security headers for HTTP/2 by default (--security-headers). PR #44 resolves #39
  • 3c95d1a86ad2059318dd0793f72d3bee10ad3cda Support five more targets. (also e6faff888cc367a867ff152c649732673c74d725)
    • x86_64-unknown-linux-gnu
    • aarch64-apple-darwin
    • aarch64-unknown-linux-gnu
    • aarch64-unknown-linux-musl
    • arm-unknown-linux-gnueabihf

Find binaries for those targets attached to this release.

Note about releases

Rust Nightly is powering the releases from now on the CI. This makes possible to reach more targets in the future.
For more details about it see Rust Nightly targets supported.
However clarify that the static-web-server project is not using any nightly feature but only stable Rust ones and the project is also tested against nightly and stable Rust on CI periodically in order to be notified in case of "regressions or bugs introduced in Nightly Rust". However it is known that the nightly compiler is very stable therefore the reason why we have chosen it for release targets via CI like many other popular Rust projects.
In any case, please don't hesitate to file an issue or send a PR.

Refactorings

  • 2b2da3a7c15111a6f114485357aad2b692f576c8 --http2-tls-cert and --http2-tls-key options now require --http2 enabled.
  • 6fe04a5eafd8b533e0cb672fbd955fbc80a8d3ea Update Docker files in order to get the new Linux binary source.
  • 77d231cc1b63f3ac7df6aa435eb87f775217d681 Drop redudant reference on CORS module.
  • d5189ec7234340ef0aab5f5dab3f96d6f54b97bb Drop root arc-path on static files module.
static-web-server - v1.17.0

Published by github-actions[bot] over 3 years ago

Updates

  • 54ae2d9f101774098e5c130aa01661bbf68391c7 Update dependencies which includes OpenSSL crate updates and others (also 299e01cf4673ed9f676607af1dd828eab6fe6c7f).

Features

  • f78de5a1e39c90b8e7d957960cd84178faee9e6e Additionally to current three targets x86_64-unknown-linux-musl, x86_64-apple-darwin, x86_64-pc-windows-msvc. We are supporting six ones more, among which five ARMs stand out:
    • x86_64-unknown-linux-gnu
    • aarch64-apple-darwin
    • aarch64-pc-windows-msvc
    • aarch64-unknown-linux-gnu
    • aarch64-unknown-linux-musl
    • arm-unknown-linux-gnueabihf

Find those targets attached to this release.

Refactorings

  • bf87d7f873c7615c170787689f6af42c06be415f Improve error messages for address binding errors. PR #43
  • 842be1d0869275b93ee0135f97d16bc5502e3fad Update Docker files in order to get the new Linux binary source.

Note about releases

Rust Nightly is powering the releases from now on the CI. This makes possible to reach more targets in the future.
For more details about it see Rust Nightly targets supported.
However clarify that the static-web-server project is not using any nightly feature but only stable Rust ones and also the project is tested against nightly and stable Rust on CI recurrently in order to be notified in case of "regressions or bugs introduced in Nightly Rust". However it is known that the nightly compiler is very stable therefore the reason why we have chosen it for release targets via CI like many other popular Rust projects.
In any case, don't hesitate to file an issue.

static-web-server - v2.0.0-beta.4

Published by joseluisq over 3 years ago

Fourth beta release v2.0.0-beta.4 with notable changes.

Updates

  • a8b937911a5402d1e7498e258017ab81402368d1 Binaries compiled with latest Rust 1.52.1 release.
  • c3389cc173e969a54b46b9f16f1e49cd2a822343 Update dependencies including latest Hyper, Tokio and related crates. (also 7cbe483f84d9deee9091ef3bd80580c55c7bfde6)

Features

  • 21bdf8c26abd5d11b704b9345e539abadf4ff18a Support inheriting TCP listener from parent process via file descriptor (-f, --fd). PR #40 by @tim-seoss.
  • 5428eb363b693f74285ba8d66edf4bad1778b3ba Redefined directory listing (-z, --directory-listing). PR #41
  • d389803b8a455be057ff31a3f4e61f5770751a6e Opt-in response body auto compression (Gzip, Deflate, Brotli) based on Accept-Encoding header (-x, --compression).
  • 74b9eaf151668980a34a98420e6d7d8ead9dc20f Just one file associated metadata per request as possible.
  • af9a32951c866e180dee6c8c359be13cc1f79d29 CORS support (-c, --cors-allow-origins).
  • 6ed3fe5250129feba03211188d6901a87a5a0c1e Unix-like termination signals handling.

Refactorings

  • a8d462aa70ecc21cb8b33cd04e40834c7254f39b Drop Warp in favor of just Hyper + Tokio. PR #38
  • 04ec1b1fd65383ba787e008670ff065085d820bd One worker thread per available core by default (-n, --threads-multiplier).
  • 991d4b8deefade61d35ef278efa28ed7fcb79bed Introduce a custom Hyper service implementation for the HTTP1 & HTTP2 web servers.
  • 58ff9b7b3f20d7631be3b16fee4839e9fe92d5e5 Reject non HEAD or GET requests on static assets and error page handlers.
  • 5cede7e92ab17ad51e93db7ad2b00edd88bf0cbd Log info for compression and directory listing features.

Docs

All feature flags as well as their equivalent environment variables are described on the updated README file.

static-web-server - v1.16.0

Published by joseluisq over 3 years ago

Updates

  • b0593ffba1b6e92214b8f451f0ebce6e2dadb2e5 Binaries compiled with latest Rust 1.52.1 release.
  • c96cd4851a7263a9e06dac73e1b325f8b072e663 Update dependencies 26.05.2021