style changes
This commit is contained in:
@@ -320,7 +320,7 @@ fn read_until_space<R: Reader>(stream: &mut R, buf: &mut [u8]) -> HttpResult<boo
|
|||||||
pub fn read_method<R: Reader>(stream: &mut R) -> HttpResult<method::Method> {
|
pub fn read_method<R: Reader>(stream: &mut R) -> HttpResult<method::Method> {
|
||||||
let mut buf = [SP, ..16];
|
let mut buf = [SP, ..16];
|
||||||
|
|
||||||
if !try!(read_until_space(stream, &mut buf)){
|
if !try!(read_until_space(stream, &mut buf)) {
|
||||||
return Err(HttpMethodError);
|
return Err(HttpMethodError);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -520,6 +520,7 @@ pub type RequestLine = (method::Method, uri::RequestUri, HttpVersion);
|
|||||||
|
|
||||||
/// Read the `RequestLine`, such as `GET / HTTP/1.1`.
|
/// Read the `RequestLine`, such as `GET / HTTP/1.1`.
|
||||||
pub fn read_request_line<R: Reader>(stream: &mut R) -> HttpResult<RequestLine> {
|
pub fn read_request_line<R: Reader>(stream: &mut R) -> HttpResult<RequestLine> {
|
||||||
|
debug!("read request line");
|
||||||
let method = try!(read_method(stream));
|
let method = try!(read_method(stream));
|
||||||
debug!("method = {}", method);
|
debug!("method = {}", method);
|
||||||
let uri = try!(read_uri(stream));
|
let uri = try!(read_uri(stream));
|
||||||
|
|||||||
Reference in New Issue
Block a user