Skip to content

Commit 1a8f192

Browse files
committed
fifth
1 parent 12886ef commit 1a8f192

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/internet_identity/src/http.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,10 @@ fn http_get_request(url: String, certificate_version: Option<u16>) -> HttpRespon
115115
}
116116
}
117117

118-
fn http_head_request(url: String, certificate_version: Option<u16>) -> HttpResponse {
119-
let mut resp = http_get_request(url, certificate_version);
120-
resp.body.clear(); // HEAD has no body
121-
resp
122-
}
123-
124118
fn method_not_allowed(unsupported_method: &str) -> HttpResponse {
125119
HttpResponse {
126120
status_code: 405,
127-
headers: vec![("Allow".into(), "GET, HEAD, OPTIONS".into())],
121+
headers: vec![("Allow".into(), "GET, OPTIONS".into())],
128122
body: ByteBuf::from(format!("Method {unsupported_method} not allowed.")),
129123
upgrade: None,
130124
streaming_strategy: None,
@@ -143,7 +137,6 @@ pub fn http_request(req: HttpRequest) -> HttpResponse {
143137
match method.as_str() {
144138
"OPTIONS" => http_options_request(),
145139
"GET" => http_get_request(url, certificate_version),
146-
"HEAD" => http_head_request(url, certificate_version),
147140
unsupported_method => method_not_allowed(unsupported_method),
148141
}
149142
}

0 commit comments

Comments
 (0)