blob: 701bf1a98e15b6d204c697f89cb5f1323fbcdd81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
use std::io::Write;
use errors::*;
pub fn set_403<W: Write>(w: &mut W) -> Result<()> {
Ok(writeln!(w, "Status: 403")?)
}
pub fn set_405<W: Write>(w: &mut W, allowed_methods: &str) -> Result<()> {
Ok(
writeln!(
w,
"Status: 405
Allow: {}",
allowed_methods)?
)
}
pub fn set_500<W: Write>(w: &mut W) -> Result<()> {
Ok(writeln!(w, "Status: 500")?)
}
|