Warn the first time a request is missing SCRIPT_PATH
This commit is contained in:
parent
868dfb6f9f
commit
b1d1fb7c0d
|
@ -67,6 +67,21 @@ impl Request {
|
||||||
.cloned()
|
.cloned()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Send out a warning if the server did not specify a SCRIPT_PATH.
|
||||||
|
// This should only be done once to avoid spaming log files
|
||||||
|
#[cfg(feature = "scgi_srv")]
|
||||||
|
if script_path.is_none() {
|
||||||
|
static WARN: std::sync::Once = std::sync::Once::new();
|
||||||
|
WARN.call_once(||
|
||||||
|
warn!(concat!(
|
||||||
|
"The SCGI server did not send a SCRIPT_PATH, indicating that it",
|
||||||
|
" doesn't comply with Gemini's SCGI spec. This will cause a problem",
|
||||||
|
" if the app needs to rewrite a URL. Please consult the proxy server",
|
||||||
|
" to identify why this is."
|
||||||
|
))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
uri.normalize();
|
uri.normalize();
|
||||||
|
|
||||||
let input = match uri.query().filter(|q| !q.is_empty()) {
|
let input = match uri.query().filter(|q| !q.is_empty()) {
|
||||||
|
|
Loading…
Reference in a new issue