Merge pull request #595 from pyfisch/originstring

refactor(headers): use String in Access-Control-Allow-Origin header
This commit is contained in:
Sean McArthur
2015-07-06 11:00:49 -07:00
2 changed files with 18 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ use std::error::Error as StdError;
use std::fmt;
use std::io::Error as IoError;
use std::str::Utf8Error;
use std::string::FromUtf8Error;
use httparse;
use url;
@@ -127,6 +128,12 @@ impl From<Utf8Error> for Error {
}
}
impl From<FromUtf8Error> for Error {
fn from(err: FromUtf8Error) -> Error {
Utf8(err.utf8_error())
}
}
impl From<httparse::Error> for Error {
fn from(err: httparse::Error) -> Error {
match err {