Skip to content

Commit

Permalink
Improved a log
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse99 committed Sep 22, 2012
1 parent 62060a2 commit 4d90b79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/connection.rs
Expand Up @@ -103,7 +103,7 @@ fn read_requests(remote_addr: ~str, fd: libc::c_int, poke: comm::Chan<option::Op
let parse = make_parser();
loop
{
let headers = read_headers(sock);
let headers = read_headers(remote_addr, sock);
if str::is_not_empty(headers)
{
match parse(headers)
Expand Down Expand Up @@ -151,7 +151,7 @@ fn read_requests(remote_addr: ~str, fd: libc::c_int, poke: comm::Chan<option::Op
// neck we could do chunked reads, but we'd need to take care to properly
// handle multi-byte utf-8 characters and the split between headers and
// the body.
fn read_headers(sock: @socket::socket_handle) -> ~str unsafe
fn read_headers(remote_addr: ~str, sock: @socket::socket_handle) -> ~str unsafe
{
let mut buffer = ~[];

Expand All @@ -165,7 +165,7 @@ fn read_headers(sock: @socket::socket_handle) -> ~str unsafe
}
result::Err(mesg) =>
{
warn!("read_headers failed with error: %s", mesg);
warn!("read_headers for %s failed with error: %s", remote_addr, mesg);
return ~"";
}
}
Expand Down

0 comments on commit 4d90b79

Please sign in to comment.