11
2- // Copyright Dean Michael Berris 2007,2009.
2+ // Copyright Dean Michael Berris 2007,2009,2010 .
33// Copyright Michael Dickey 2008.
44// Distributed under the Boost Software License, Version 1.0.
55// (See accompanying file LICENSE_1_0.txt or copy at
1818#include < boost/network/protocol/http/header.hpp>
1919#include < boost/network/traits/vector.hpp>
2020
21+ #include < boost/cstdint.hpp>
22+
2123namespace boost {namespace network {namespace http {
2224
2325/* * request.hpp
@@ -31,11 +33,12 @@ namespace boost { namespace network { namespace http {
3133class basic_request :public basic_message <Tag>
3234 {
3335
34- boost::network::uri::http::uri uri_;
36+ mutable boost::network::uri::http::uri uri_;
3537
3638public:
3739typedef Tag tag;
3840typedef typename string<Tag>::type string_type;
41+ typedef boost::uint16_t port_type;
3942
4043explicit basic_request (string_typeconst & uri_)
4144 : uri_(uri_)
@@ -70,7 +73,7 @@ namespace boost { namespace network { namespace http {
7073return uri_.host ();
7174 }
7275
73- unsigned int port ()const {
76+ port_type port ()const {
7477return uri_.port ();
7578 }
7679
@@ -90,6 +93,10 @@ namespace boost { namespace network { namespace http {
9093return uri_.scheme ();
9194 }
9295
96+ void uri (string_typeconst & new_uri)const {
97+ uri_ = new_uri;
98+ }
99+
93100 };
94101
95102/* * This is the implementation of a POD request type
@@ -104,6 +111,7 @@ namespace boost { namespace network { namespace http {
104111typedef tags::http_server tag;
105112typedef string<tags::http_server>::type string_type;
106113typedef vector<tags::http_server>::apply<request_header>::type vector_type;
114+ typedef boost::uint16_t port_type;
107115 string_type method;
108116 string_type uri;
109117 boost::uint8_t http_version_major;