@@ -1253,7 +1253,7 @@ pub mod test {
1253
1253
as * request_wrapper ;
1254
1254
let buf_base = get_base_from_buf ( buf) ;
1255
1255
let buf_len = get_len_from_buf ( buf) ;
1256
- let bytes = vec:: from_buf ( buf_base, buf_len as uint ) ;
1256
+ let bytes = vec:: from_buf ( buf_base, nread as uint ) ;
1257
1257
let read_chan = ( * client_data) . read_chan . clone ( ) ;
1258
1258
let msg_from_server = str:: from_bytes ( bytes) ;
1259
1259
read_chan. send ( msg_from_server) ;
@@ -1445,15 +1445,15 @@ pub mod test {
1445
1445
buf_base as uint,
1446
1446
buf_len as uint,
1447
1447
nread) ) ;
1448
- let bytes = vec:: from_buf ( buf_base, buf_len ) ;
1448
+ let bytes = vec:: from_buf ( buf_base, nread as uint ) ;
1449
1449
let request_str = str:: from_bytes ( bytes) ;
1450
1450
1451
1451
let client_data = get_data_for_uv_handle (
1452
1452
client_stream_ptr as * libc:: c_void ) as * tcp_server_data ;
1453
1453
1454
1454
let server_kill_msg = ( * client_data) . server_kill_msg ;
1455
1455
let write_req = ( * client_data) . server_write_req ;
1456
- if ( str:: contains ( request_str, server_kill_msg) ) {
1456
+ if str:: contains ( request_str, server_kill_msg) {
1457
1457
log ( debug, ~"SERVER : client req contains kill_msg!");
1458
1458
log(debug, ~" SERVER : sending response to client") ;
1459
1459
read_stop ( client_stream_ptr) ;
0 commit comments