index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2023-04-30 19:33:24.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2023-04-30 19:33:24.0 +00:00:00
commit
f8fca0a84c9a3fb02e1fc0c4a86801316efaea54 [patch]
tree
45cc8d33a9393f27fc0b9454f76f3b39f8fb82ac
parent
a345df3eabfd66d21517ce7f9e0efff48c02658b
download
f8fca0a84c9a3fb02e1fc0c4a86801316efaea54.tar.gz

chore: add spdx license identifiers

this makes license information precise and concise, leading to code
that is easier to reuse since the license information now will travel
with evey source file.

Diff

 src/basic_auth.rs         | 5 +++++
 src/bin/server.rs         | 5 +++++
 src/compression.rs        | 5 +++++
 src/compression_static.rs | 5 +++++
 src/control_headers.rs    | 5 +++++
 src/cors.rs               | 5 +++++
 src/custom_headers.rs     | 5 +++++
 src/directory_listing.rs  | 5 +++++
 src/error.rs              | 5 +++++
 src/error_page.rs         | 5 +++++
 src/exts/http.rs          | 5 +++++
 src/exts/mod.rs           | 5 +++++
 src/exts/path.rs          | 5 +++++
 src/fallback_page.rs      | 5 +++++
 src/handler.rs            | 5 +++++
 src/helpers.rs            | 5 +++++
 src/lib.rs                | 5 +++++
 src/logger.rs             | 5 +++++
 src/redirects.rs          | 5 +++++
 src/rewrites.rs           | 5 +++++
 src/security_headers.rs   | 5 +++++
 src/server.rs             | 5 +++++
 src/service.rs            | 5 +++++
 src/settings/cli.rs       | 5 +++++
 src/settings/file.rs      | 5 +++++
 src/settings/mod.rs       | 5 +++++
 src/signals.rs            | 5 +++++
 src/static_files.rs       | 5 +++++
 src/tls.rs                | 5 +++++
 src/transport.rs          | 5 +++++
 src/winservice.rs         | 5 +++++
 31 files changed, 155 insertions(+)

diff --git a/src/basic_auth.rs b/src/basic_auth.rs
index 9daada8..0183733 100644
--- a/src/basic_auth.rs
+++ b/src/basic_auth.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Basic HTTP Authorization Schema module.
//!

diff --git a/src/bin/server.rs b/src/bin/server.rs
index 4d7732c..72792e4 100644
--- a/src/bin/server.rs
+++ b/src/bin/server.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

#![forbid(unsafe_code)]
#![deny(warnings)]
#![deny(rust_2018_idioms)]
diff --git a/src/compression.rs b/src/compression.rs
index 110723b..0dc0f7a 100644
--- a/src/compression.rs
+++ b/src/compression.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Auto-compression module to compress responses body.
//!

diff --git a/src/compression_static.rs b/src/compression_static.rs
index 8948cf6..c3be592 100644
--- a/src/compression_static.rs
+++ b/src/compression_static.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Compression static module to serve compressed files directly from the file system.
//!

diff --git a/src/control_headers.rs b/src/control_headers.rs
index aadf506..87662cc 100644
--- a/src/control_headers.rs
+++ b/src/control_headers.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! It provides an arbitrary `Cache-Control` headers functionality
//! for incoming requests based on a set of file types.
//!
diff --git a/src/cors.rs b/src/cors.rs
index 77d2ab0..f2f7fee 100644
--- a/src/cors.rs
+++ b/src/cors.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! CORS module to handle incoming requests.
//!

diff --git a/src/custom_headers.rs b/src/custom_headers.rs
index e972a57..4106053 100644
--- a/src/custom_headers.rs
+++ b/src/custom_headers.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Module to append custom HTTP headers via TOML config file.
//!

diff --git a/src/directory_listing.rs b/src/directory_listing.rs
index b7787f5..47753a1 100644
--- a/src/directory_listing.rs
+++ b/src/directory_listing.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! It provides directory listig and auto-index support.
//!

diff --git a/src/error.rs b/src/error.rs
index 3902eb6..27fe306 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Useful error type re-exports based on [anyhow][mod@anyhow].
//!

diff --git a/src/error_page.rs b/src/error_page.rs
index 6beb947..e97211b 100644
--- a/src/error_page.rs
+++ b/src/error_page.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Error page module to compose an HTML page response.
//!

diff --git a/src/exts/http.rs b/src/exts/http.rs
index 9ea932b..3db2da2 100644
--- a/src/exts/http.rs
+++ b/src/exts/http.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! HTTP-related extension traits.

use hyper::Method;
diff --git a/src/exts/mod.rs b/src/exts/mod.rs
index 9831796..9d17672 100644
--- a/src/exts/mod.rs
+++ b/src/exts/mod.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Some extension traits for various use cases.

pub mod http;
diff --git a/src/exts/path.rs b/src/exts/path.rs
index ce17e49..9f84fde 100644
--- a/src/exts/path.rs
+++ b/src/exts/path.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Path-related extension traits.

use std::path::{Component, Path};
diff --git a/src/fallback_page.rs b/src/fallback_page.rs
index 9b1370e..8986b2d 100644
--- a/src/fallback_page.rs
+++ b/src/fallback_page.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Fallback page module useful for a custom page default.
//!

diff --git a/src/handler.rs b/src/handler.rs
index 2d596fa..26cc42f 100644
--- a/src/handler.rs
+++ b/src/handler.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Request handler module intended to manage incoming HTTP requests.
//!

diff --git a/src/helpers.rs b/src/helpers.rs
index 866e200..ee2b963 100644
--- a/src/helpers.rs
+++ b/src/helpers.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

use std::fs;
use std::path::{Path, PathBuf};

diff --git a/src/lib.rs b/src/lib.rs
index ba63e99..c758a13 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! # Static Web Server (SWS)
//!
//! SWS is a cross-platform, high-performance and asynchronous web server for static files-serving.
diff --git a/src/logger.rs b/src/logger.rs
index c27786b..49f585a 100644
--- a/src/logger.rs
+++ b/src/logger.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Provides logging initialization for the web server.
//!

diff --git a/src/redirects.rs b/src/redirects.rs
index bf88616..c056180 100644
--- a/src/redirects.rs
+++ b/src/redirects.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Redirection module to handle config redirect URLs with pattern matching support.
//!

diff --git a/src/rewrites.rs b/src/rewrites.rs
index 1b4a320..66e5550 100644
--- a/src/rewrites.rs
+++ b/src/rewrites.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Module that allows to rewrite request URLs with pattern matching support.
//!

diff --git a/src/security_headers.rs b/src/security_headers.rs
index eb35376..e02edb5 100644
--- a/src/security_headers.rs
+++ b/src/security_headers.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The module provides several HTTP security headers support.
//!

diff --git a/src/server.rs b/src/server.rs
index 79f71e8..9c1759b 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Server module intended to construct a multi-thread HTTP or HTTP/2 web server.
//!

diff --git a/src/service.rs b/src/service.rs
index 9161c98..38a051e 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The module provides a custom [Hyper service](hyper::service::Service).
//!

diff --git a/src/settings/cli.rs b/src/settings/cli.rs
index d21c52e..b346558 100644
--- a/src/settings/cli.rs
+++ b/src/settings/cli.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The server CLI options

use std::path::PathBuf;
diff --git a/src/settings/file.rs b/src/settings/file.rs
index 06685f2..37298a6 100644
--- a/src/settings/file.rs
+++ b/src/settings/file.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The server configuration file options (manifest)

use headers::HeaderMap;
diff --git a/src/settings/mod.rs b/src/settings/mod.rs
index 7aa3c05..24b8cf8 100644
--- a/src/settings/mod.rs
+++ b/src/settings/mod.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Module that provides all settings of SWS.
//!

diff --git a/src/signals.rs b/src/signals.rs
index f28c8ba..9679a26 100644
--- a/src/signals.rs
+++ b/src/signals.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The module provides signals support like `SIGTERM`, `SIGINT` and `SIGQUIT`.
//!

diff --git a/src/static_files.rs b/src/static_files.rs
index 3630dfa..bdf4034 100644
--- a/src/static_files.rs
+++ b/src/static_files.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The static file module which powers the web server.
//!

diff --git a/src/tls.rs b/src/tls.rs
index 6a20032..195141e 100644
--- a/src/tls.rs
+++ b/src/tls.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! The module handles requests over TLS via [Rustls](tokio_rustls::rustls).
//!

diff --git a/src/transport.rs b/src/transport.rs
index e372e89..1a9e9d7 100644
--- a/src/transport.rs
+++ b/src/transport.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Async transport module.
//!

diff --git a/src/winservice.rs b/src/winservice.rs
index e197986..0898385 100644
--- a/src/winservice.rs
+++ b/src/winservice.rs
@@ -1,3 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
// This file is part of Static Web Server.
// See https://static-web-server.net/ for more information
// Copyright (C) 2019-present Jose Quintana <joseluisq.net>

//! Module that lets SWS to run in a "Windows Service" context
//!