Fix shadowing warnings

fix #510
This commit is contained in:
Vinnie Falco
2017-06-18 14:57:32 -07:00
parent 65932ee343
commit 8f627b0748
15 changed files with 99 additions and 97 deletions

View File

@ -137,7 +137,7 @@ receive_expect_100_continue(
response<empty_body> res;
res.version = 11;
res.result(status::continue_);
res.insert(field::server, "test");
res.set(field::server, "test");
write(stream, res, ec);
if(ec)
return;
@ -199,8 +199,8 @@ send_cgi_response(
res.result(status::ok);
res.version = 11;
res.insert(field::server, "Beast");
res.insert(field::transfer_encoding, "chunked");
res.set(field::server, "Beast");
res.set(field::transfer_encoding, "chunked");
// No data yet, but we set more = true to indicate
// that it might be coming later. Otherwise the
@ -308,7 +308,7 @@ void do_server_head(
// Set up the response, starting with the common fields
response<string_body> res;
res.version = 11;
res.insert(field::server, "test");
res.set(field::server, "test");
// Now handle request-specific fields
switch(req.method())
@ -338,7 +338,7 @@ void do_server_head(
// We return responses indicating an error if
// we do not recognize the request method.
res.result(status::bad_request);
res.insert(field::content_type, "text/plain");
res.set(field::content_type, "text/plain");
res.body = "Invalid request-method '" + req.method_string().to_string() + "'";
break;
}
@ -398,11 +398,11 @@ do_head_request(
req.version = 11;
req.method(verb::head);
req.target(target);
req.insert(field::user_agent, "test");
req.set(field::user_agent, "test");
// A client MUST send a Host header field in all HTTP/1.1 request messages.
// https://tools.ietf.org/html/rfc7230#section-5.4
req.insert(field::host, "localhost");
req.set(field::host, "localhost");
// Now send it
write(stream, req, ec);