Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit dc74f77

Browse files
committed
compile clean with gcc 4.6.3
1 parent dc7762e commit dc74f77

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

server_http.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ namespace SimpleWeb {
242242
}
243243

244244
//Set timeout on the following boost::asio::async-read or write function
245-
auto timer=get_timeout_timer(socket, timeout_request);
245+
auto timer=this->get_timeout_timer(socket, timeout_request);
246246

247247
boost::asio::async_read_until(*socket, request->streambuf, "\r\n\r\n",
248248
[this, socket, request, timer](const boost::system::error_code& ec, size_t bytes_transferred) {
@@ -255,7 +255,7 @@ namespace SimpleWeb {
255255
//streambuf (maybe some bytes of the content) is appended to in the async_read-function below (for retrieving content).
256256
size_t num_additional_bytes=request->streambuf.size()-bytes_transferred;
257257

258-
if(!parse_request(request))
258+
if(!this->parse_request(request))
259259
return;
260260

261261
//If content, read that as well
@@ -272,22 +272,22 @@ namespace SimpleWeb {
272272
}
273273
if(content_length>num_additional_bytes) {
274274
//Set timeout on the following boost::asio::async-read or write function
275-
auto timer=get_timeout_timer(socket, timeout_content);
275+
auto timer=this->get_timeout_timer(socket, timeout_content);
276276
boost::asio::async_read(*socket, request->streambuf,
277277
boost::asio::transfer_exactly(content_length-num_additional_bytes),
278278
[this, socket, request, timer]
279279
(const boost::system::error_code& ec, size_t /*bytes_transferred*/) {
280280
if(timer)
281281
timer->cancel();
282282
if(!ec)
283-
find_resource(socket, request);
283+
this->find_resource(socket, request);
284284
});
285285
}
286286
else
287-
find_resource(socket, request);
287+
this->find_resource(socket, request);
288288
}
289289
else
290-
find_resource(socket, request);
290+
this->find_resource(socket, request);
291291
}
292292
});
293293
}
@@ -357,11 +357,11 @@ namespace SimpleWeb {
357357
std::function<void(std::shared_ptr<typename ServerBase<socket_type>::Response>,
358358
std::shared_ptr<typename ServerBase<socket_type>::Request>)>& resource_function) {
359359
//Set timeout on the following boost::asio::async-read or write function
360-
auto timer=get_timeout_timer(socket, timeout_content);
360+
auto timer=this->get_timeout_timer(socket, timeout_content);
361361

362362
auto response=std::shared_ptr<Response>(new Response(socket), [this, request, timer](Response *response_ptr) {
363363
auto response=std::shared_ptr<Response>(response_ptr);
364-
send(response, [this, response, request, timer](const boost::system::error_code& ec) {
364+
this->send(response, [this, response, request, timer](const boost::system::error_code& ec) {
365365
if(timer)
366366
timer->cancel();
367367
if(!ec) {
@@ -381,7 +381,7 @@ namespace SimpleWeb {
381381
return;
382382
}
383383
if(http_version>1.05)
384-
read_request_and_content(response->socket);
384+
this->read_request_and_content(response->socket);
385385
}
386386
});
387387
});
@@ -423,7 +423,7 @@ namespace SimpleWeb {
423423
boost::asio::ip::tcp::no_delay option(true);
424424
socket->set_option(option);
425425

426-
read_request_and_content(socket);
426+
this->read_request_and_content(socket);
427427
}
428428
});
429429
}

0 commit comments

Comments
 (0)