1
1
2
- // Copyright Dean Michael Berris 2007,2009.
2
+ // Copyright Dean Michael Berris 2007,2009,2010 .
3
3
// Copyright Michael Dickey 2008.
4
4
// Distributed under the Boost Software License, Version 1.0.
5
5
// (See accompanying file LICENSE_1_0.txt or copy at
18
18
#include < boost/network/protocol/http/header.hpp>
19
19
#include < boost/network/traits/vector.hpp>
20
20
21
+ #include < boost/cstdint.hpp>
22
+
21
23
namespace boost { namespace network { namespace http {
22
24
23
25
/* * request.hpp
@@ -31,11 +33,12 @@ namespace boost { namespace network { namespace http {
31
33
class basic_request : public basic_message <Tag>
32
34
{
33
35
34
- boost::network::uri::http::uri uri_;
36
+ mutable boost::network::uri::http::uri uri_;
35
37
36
38
public:
37
39
typedef Tag tag;
38
40
typedef typename string<Tag>::type string_type;
41
+ typedef boost::uint16_t port_type;
39
42
40
43
explicit basic_request (string_type const & uri_)
41
44
: uri_(uri_)
@@ -70,7 +73,7 @@ namespace boost { namespace network { namespace http {
70
73
return uri_.host ();
71
74
}
72
75
73
- unsigned int port () const {
76
+ port_type port () const {
74
77
return uri_.port ();
75
78
}
76
79
@@ -90,6 +93,10 @@ namespace boost { namespace network { namespace http {
90
93
return uri_.scheme ();
91
94
}
92
95
96
+ void uri (string_type const & new_uri) const {
97
+ uri_ = new_uri;
98
+ }
99
+
93
100
};
94
101
95
102
/* * This is the implementation of a POD request type
@@ -104,6 +111,7 @@ namespace boost { namespace network { namespace http {
104
111
typedef tags::http_server tag;
105
112
typedef string<tags::http_server>::type string_type;
106
113
typedef vector<tags::http_server>::apply<request_header>::type vector_type;
114
+ typedef boost::uint16_t port_type;
107
115
string_type method;
108
116
string_type uri;
109
117
boost::uint8_t http_version_major;
0 commit comments