forked fromglynos/cpp-netlib
- Notifications
You must be signed in to change notification settings - Fork425
Commit6abafda
committed
Making uri::port(...) return a convertible wrapper
To address the issue with regard to the Host header being sent by theclient to not include custom (or user-provided) port, the uri::port(...)free function should instead return a convertible wrapper to either aboost::optional<boost::uint16_t> or a boost::uint16_t. The rationale forthis is so that the client can eventually get for theboost::optional<boost::uint16_t> instead of just a boost::uint16_t andinclude that as part of the client's Host header forming routine.That change will have to go into the linearize algorithm, and should bedone in the next commit. This change to the interface would still haveto be documented, but should otherwise not break any existing coderelying on uri::port(...) returning just a boost::uint16_t.1 parent53254c4 commit6abafda
File tree
5 files changed
+49
-21
lines changed- boost/network
- protocol/http/impl
- uri
- http
- libs/network/test/http
5 files changed
+49
-21
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 |
| |
125 | 130 |
| |
126 | 131 |
| |
127 | 132 |
| |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
128 | 139 |
| |
129 | 140 |
| |
130 | 141 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
96 |
| - | |
| 95 | + | |
97 | 96 |
| |
98 | 97 |
| |
99 | 98 |
| |
|
Lines changed: 24 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
| 14 | + | |
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
| |||
157 | 158 |
| |
158 | 159 |
| |
159 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
160 | 181 |
| |
161 | 182 |
| |
162 |
| - | |
| 183 | + | |
163 | 184 |
| |
164 |
| - | |
| 185 | + | |
165 | 186 |
| |
166 | 187 |
| |
167 | 188 |
| |
|
Lines changed: 3 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
26 |
| - | |
| 27 | + | |
| 28 | + | |
27 | 29 |
| |
28 | 30 |
| |
29 | 31 |
| |
| |||
33 | 35 |
| |
34 | 36 |
| |
35 | 37 |
| |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 | 38 |
| |
42 | 39 |
| |
43 | 40 |
| |
|
Lines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 | 23 |
| |
25 | 24 |
| |
26 | 25 |
| |
27 |
| - | |
28 |
| - | |
29 | 26 |
| |
30 | 27 |
| |
| 28 | + | |
| 29 | + | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
82 |
| - | |
83 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
84 | 84 |
| |
85 |
| - | |
| 85 | + | |
86 | 86 |
| |
87 |
| - | |
88 |
| - | |
89 |
| - | |
| 87 | + | |
| 88 | + | |
| 89 | + |
0 commit comments
Comments
(0)