Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Message refactor#631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 11 commits intocpp-netlib:masterfromglynos:message_refactor
Apr 11, 2016
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
858eea7
Added image to the license in README.rst.
glynosApr 4, 2016
0187ec1
Removed some redundant headers.
glynosApr 2, 2016
047d89c
Added a first test in order to start refactoring the HTTP request/res…
glynosApr 3, 2016
40bab67
Since I removed the include directory in a previous commit, I have no…
glynosApr 3, 2016
175cdd3
Updated the examples that used the include directory that I removed.
glynosApr 3, 2016
5614b43
Removed boost/network.hpp
glynosApr 9, 2016
2f61e45
Fixed string constants.
glynosApr 10, 2016
4c9fbda
Added a unit tests for the HTTP client request.
glynosApr 10, 2016
5f6ab56
Added a unit test for the HTTP client response.
glynosApr 10, 2016
99c777c
Removed some headers that looked redundant.
glynosApr 10, 2016
1e14f3c
Refactored HTTP client request and response.
glynosApr 10, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletionsREADME.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,9 @@ Modern C++ network programming libraries.
.. image:: https://scan.coverity.com/projects/6714/badge.svg
:target: https://scan.coverity.com/projects/cpp-netlib

.. image:: https://img.shields.io/badge/license-boost-blue.svg
:target: https://github.com/cpp-netlib/cpp-netlib/blob/master/LICENSE_1_0.txt

Join us on Slack: http://slack.cpp-netlib.org/

Subscribe to the mailing list: https://groups.google.com/forum/#!forum/cpp-netlib
Expand Down
17 changes: 0 additions & 17 deletionsboost/network.hpp
View file
Open in desktop

This file was deleted.

36 changes: 15 additions & 21 deletionsboost/network/constants.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,80 +18,75 @@ template <class Tag>
struct constants_narrow {

static char const* crlf() {
static char crlf_[] ={'\r', '\n', 0};
static char crlf_[] ="\r\n";
return crlf_;
}

static char const* dot() {
static char dot_[] ={'.', 0};
static char dot_[] =".";
return dot_;
}

static char dot_char() { return '.'; }

static char const* http_slash() {
static char http_slash_[] ={'H', 'T', 'T', 'P', '/', 0};
static char http_slash_[] ="HTTP/";
return http_slash_;
}

static char const* space() {
static char space_[] ={' ', 0};
static char space_[] =" ";
return space_;
}

static char space_char() { return ' '; }

static char const* slash() {
static char slash_[] ={'/', 0};
static char slash_[] ="/";
return slash_;
}

static char slash_char() { return '/'; }

static char const* host() {
static char host_[] ={'H', 'o', 's', 't', 0};
static char host_[] ="Host";
return host_;
}

static char const* colon() {
static char colon_[] ={':', 0};
static char colon_[] =":";
return colon_;
}

static char colon_char() { return ':'; }

static char const* accept() {
static char accept_[] ={'A', 'c', 'c', 'e', 'p', 't', 0};
static char accept_[] ="Accept";
return accept_;
}

static char const* default_accept_mime() {
static char mime_[] ={'*', '/', '*', 0};
static char mime_[] ="*/*";
return mime_;
}

static char const* accept_encoding() {
static char accept_encoding_[] = {'A', 'c', 'c', 'e', 'p', 't', '-', 'E',
'n', 'c', 'o', 'd', 'i', 'n', 'g', 0};
static char accept_encoding_[] = "Accept-Encoding";
return accept_encoding_;
}

static char const* default_accept_encoding() {
static char default_accept_encoding_[] = {
'i', 'd', 'e', 'n', 't', 'i', 't', 'y', ';', 'q', '=',
'1', '.', '0', ',', ' ', '*', ';', 'q', '=', '0', 0};
static char default_accept_encoding_[] = "identity;q=1.0, *;q=0";
return default_accept_encoding_;
}

static char const* user_agent() {
static char user_agent_[] = {'U', 's', 'e', 'r', '-', 'A',
'g', 'e', 'n', 't', 0};
static char user_agent_[] = "User-Agent";
return user_agent_;
}

static char const* cpp_netlib_slash() {
static char cpp_netlib_slash_[] = {'c', 'p', 'p', '-', 'n', 'e',
't', 'l', 'i', 'b', '/', 0};
static char cpp_netlib_slash_[] = "cpp-netlib/";
return cpp_netlib_slash_;
}

Expand All@@ -100,13 +95,12 @@ struct constants_narrow {
static char hash_char() { return '#'; }

static char const* connection() {
static char connection_[] = {'C', 'o', 'n', 'n', 'e', 'c',
't', 'i', 'o', 'n', 0};
static char connection_[] = "Connection";
return connection_;
}

static char const* close() {
static char close_[] ={'C', 'l', 'o', 's', 'e', 0};
static char close_[] ="Close";
return close_;
}

Expand Down
13 changes: 0 additions & 13 deletionsboost/network/include/http/client.hpp
View file
Open in desktop

This file was deleted.

13 changes: 0 additions & 13 deletionsboost/network/include/http/server.hpp
View file
Open in desktop

This file was deleted.

17 changes: 0 additions & 17 deletionsboost/network/include/message.hpp
View file
Open in desktop

This file was deleted.

2 changes: 1 addition & 1 deletionboost/network/protocol/http/client.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@
#include <boost/config.hpp>
#include <boost/network/protocol/http/message.hpp>
#include <boost/network/protocol/http/request.hpp>
#include <boost/network/protocol/http/response.hpp>
#include <boost/network/protocol/http/client/response.hpp>
#include <boost/network/traits/ostringstream.hpp>

#include <boost/algorithm/string/classification.hpp>
Expand Down
10 changes: 2 additions & 8 deletionsboost/network/protocol/http/client/facade.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,19 +10,13 @@
#include <memory>
#include <functional>
#include <boost/network/protocol/http/client/pimpl.hpp>
#include <boost/network/protocol/http/request.hpp>
#include <boost/network/protocol/http/response.hpp>
#include <boost/network/protocol/http/client/request.hpp>
#include <boost/network/protocol/http/client/response.hpp>

namespace boost {
namespace network {
namespace http {

template <class Tag>
struct basic_request;

template <class Tag>
struct basic_response;

template <class Tag, unsigned version_major, unsigned version_minor>
class basic_client_facade {
typedef basic_client_impl<Tag, version_major, version_minor> pimpl_type;
Expand Down
19 changes: 19 additions & 0 deletionsboost/network/protocol/http/client/request.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
// Copyright 2016 Glyn Matthews.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#if !defined(BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC)
#define BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC

#include <boost/network/protocol/http/impl/request.hpp>

namespace boost {
namespace network {
namespace http {
using client_request = basic_request<tags::http_async_8bit_tcp_resolve>;
} // namespace http
} // namespace network
} // namespace boost

#endif // BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_REQUEST_INC
19 changes: 19 additions & 0 deletionsboost/network/protocol/http/client/response.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
// Copyright 2016 Glyn Matthews.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#if !defined(BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC)
#define BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC

#include <boost/network/protocol/http/response.hpp>

namespace boost {
namespace network {
namespace http {
using client_response = basic_response<tags::http_async_8bit_tcp_resolve>;
} // namespace http
} // namespace network
} // namespace boost

#endif // BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_RESPONSE_INC
6 changes: 1 addition & 5 deletionsboost/network/protocol/http/impl/request.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,7 @@ namespace http {
*/
template <class Tag>
struct basic_request : public basic_message<Tag> {
mutableboost::network::uri::uri uri_;
boost::network::uri::uri uri_;
std::uint16_t source_port_;
typedef basic_message<Tag> base_type;

Expand All@@ -65,10 +65,6 @@ struct basic_request : public basic_message<Tag> {
explicit basic_request(boost::network::uri::uri const& uri_)
: uri_(uri_), source_port_(0) {}

void uri(string_type const& new_uri) { uri_ = new_uri; }

void uri(boost::network::uri::uri const& new_uri) { uri_ = new_uri; }

basic_request() : base_type(), source_port_(0) {}

basic_request(basic_request const& other)
Expand Down
75 changes: 0 additions & 75 deletionsboost/network/protocol/http/server/impl/parsers.ipp
View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp