refactor(headers): use String in Access-Control-Allow-Origin header
Access-Control-Allow-Origin origins are URLs but they do not need to be valid, they should just be compared as strings. So to support invalid URLs hyper should use a string instead. closes #526 BREAKING CHANGE: Access-Control-Allow-Origin does no longer use Url
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