ignore case on header keys
This commit is contained in:
parent
d2fb78108e
commit
fc064efb61
2 changed files with 6 additions and 7 deletions
|
|
@ -81,7 +81,7 @@ env!("CARGO_PKG_VERSION"));
|
|||
}
|
||||
|
||||
if request.path() == "/" {
|
||||
if request.headers().get("Accept").is_some_and(
|
||||
if request.headers().get("accept").is_some_and(
|
||||
|accept| accept.contains("text/html")
|
||||
) {
|
||||
// HTML response
|
||||
|
|
@ -136,7 +136,7 @@ env!("CARGO_PKG_VERSION"));
|
|||
|
||||
let response_content = content
|
||||
.replace("{{response}}", &query_response)
|
||||
.replace("{{host}}", match request.headers().get("Host") {
|
||||
.replace("{{host}}", match request.headers().get("host") {
|
||||
Some(host) => { host }
|
||||
None => { "mcq.bliss.town" }
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue