Ubuntu 18.04 Upgrade #3
2 changed files with 4 additions and 2 deletions
|
|
@ -40,6 +40,7 @@ namespace fc {
|
||||||
struct request
|
struct request
|
||||||
{
|
{
|
||||||
fc::string get_header( const fc::string& key )const;
|
fc::string get_header( const fc::string& key )const;
|
||||||
|
fc::string remote_endpoint;
|
||||||
fc::string method;
|
fc::string method;
|
||||||
fc::string domain;
|
fc::string domain;
|
||||||
fc::string path;
|
fc::string path;
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ fc::tcp_socket& connection::get_socket()const {
|
||||||
|
|
||||||
http::request connection::read_request()const {
|
http::request connection::read_request()const {
|
||||||
http::request req;
|
http::request req;
|
||||||
|
req.remote_endpoint = fc::variant(get_socket().remote_endpoint()).as_string();
|
||||||
std::vector<char> line(1024*8);
|
std::vector<char> line(1024*8);
|
||||||
int s = my->read_until( line.data(), line.data()+line.size(), ' ' ); // METHOD
|
int s = my->read_until( line.data(), line.data()+line.size(), ' ' ); // METHOD
|
||||||
req.method = line.data();
|
req.method = line.data();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue