Merge pull request #595 from pyfisch/originstring
refactor(headers): use String in Access-Control-Allow-Origin header
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user