Clean up 'conditionally-set-server-header' test.

This commit is contained in:
Sergio Benitez 2019-05-08 20:10:22 -07:00
parent 0a068b0dd6
commit cb359fe38b
1 changed files with 6 additions and 14 deletions

View File

@ -1,27 +1,19 @@
#![feature(proc_macro_hygiene, decl_macro)] #![feature(proc_macro_hygiene, decl_macro)]
#[macro_use] #[macro_use] extern crate rocket;
extern crate rocket;
extern crate rocket_http;
use rocket::response::Redirect;
use rocket::Response; use rocket::Response;
use rocket_http::{Header, Status}; use rocket::http::Header;
#[get("/do_not_overwrite")] #[get("/do_not_overwrite")]
fn do_not_overwrite<'r>() -> Result<Response<'r>, ()> { fn do_not_overwrite() -> Response<'static> {
let header = Header::new("Server", "Test");
Response::build() Response::build()
.header(header) .header(Header::new("Server", "Test"))
.ok() .finalize()
} }
#[get("/use_default")] #[get("/use_default")]
fn use_default<'r>() -> Result<Response<'r>, ()> { fn use_default() { }
Response::build()
.ok()
}
mod conditionally_set_server_header { mod conditionally_set_server_header {
use super::*; use super::*;