summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-03-17 00:15:49 (UTC)
committer Michael Krelin <hacker@klever.net>2007-03-17 00:15:49 (UTC)
commit29f2fd81e0f4e62c54371b90469d64ec5e47bd8a (patch) (unidiff)
tree6c94ade0bd8a3ca92afead27939b586713e5e789
parent88e7e2ac30d181e30a7c4fa36d0029990136efb6 (diff)
downloadsitecing-master.zip
sitecing-master.tar.gz
sitecing-master.tar.bz2
added missing includeHEADpublic/mastermaster
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/exception.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sitecing/exception.h b/include/sitecing/exception.h
index 857a8e6..ccc7edd 100644
--- a/include/sitecing/exception.h
+++ b/include/sitecing/exception.h
@@ -1,780 +1,783 @@
1#ifndef __SITECING_EXCEPTION_H 1#ifndef __SITECING_EXCEPTION_H
2#define __SITECING_EXCEPTION_H 2#define __SITECING_EXCEPTION_H
3 3
4#include <string>
5
4/** 6/**
5 * @file 7 * @file
6 * @brief The site-C-ing specific exceptions. 8 * @brief The site-C-ing specific exceptions.
7 */ 9 */
8 10
9/** 11/**
10 * @brief The main site-C-ing namespace. 12 * @brief The main site-C-ing namespace.
11 */ 13 */
12namespace sitecing { 14namespace sitecing {
15 using std::string;
13 16
14 // TODO: status specifics 17 // TODO: status specifics
15 18
16 /** 19 /**
17 * The http status to return. 20 * The http status to return.
18 */ 21 */
19 class http_status { 22 class http_status {
20 public: 23 public:
21 /** 24 /**
22 * The status string. 25 * The status string.
23 */ 26 */
24 string status; 27 string status;
25 /** 28 /**
26 * The message to follow the status string. 29 * The message to follow the status string.
27 */ 30 */
28 string message; 31 string message;
29 32
30 /** 33 /**
31 * @param s HTTP status. 34 * @param s HTTP status.
32 * @param m HTTP status message. 35 * @param m HTTP status message.
33 */ 36 */
34 http_status(const string& s,const string& m) 37 http_status(const string& s,const string& m)
35 : status(s), message(m) { } 38 : status(s), message(m) { }
36 virtual ~http_status() throw() { } 39 virtual ~http_status() throw() { }
37 }; 40 };
38 41
39 // per RFC 2616 42 // per RFC 2616
40 43
41 /** 44 /**
42 * Informational. 45 * Informational.
43 */ 46 */
44 class http_status_1xx : public http_status { 47 class http_status_1xx : public http_status {
45 public: 48 public:
46 /** 49 /**
47 * @param s HTTP status 50 * @param s HTTP status
48 * @param m HTTP status message 51 * @param m HTTP status message
49 */ 52 */
50 explicit http_status_1xx(const string &s,const string& m) 53 explicit http_status_1xx(const string &s,const string& m)
51 : http_status(s,m) { } 54 : http_status(s,m) { }
52 }; 55 };
53 /** 56 /**
54 * Continue. 57 * Continue.
55 */ 58 */
56 class http_status_100 : public http_status_1xx { 59 class http_status_100 : public http_status_1xx {
57 public: 60 public:
58 /** 61 /**
59 * @param m HTTP status message 62 * @param m HTTP status message
60 */ 63 */
61 explicit http_status_100(const string& m) 64 explicit http_status_100(const string& m)
62 : http_status_1xx("100",m) { } 65 : http_status_1xx("100",m) { }
63 explicit http_status_100() 66 explicit http_status_100()
64 : http_status_1xx("100","Continue") { } 67 : http_status_1xx("100","Continue") { }
65 }; 68 };
66 /** 69 /**
67 * Switching protocols. 70 * Switching protocols.
68 */ 71 */
69 class http_status_101 : public http_status_1xx { 72 class http_status_101 : public http_status_1xx {
70 public: 73 public:
71 /** 74 /**
72 * @param m HTTP status message 75 * @param m HTTP status message
73 */ 76 */
74 explicit http_status_101(const string& m) 77 explicit http_status_101(const string& m)
75 : http_status_1xx("101",m) { } 78 : http_status_1xx("101",m) { }
76 explicit http_status_101() 79 explicit http_status_101()
77 : http_status_1xx("101","Switching protocols") { } 80 : http_status_1xx("101","Switching protocols") { }
78 }; 81 };
79 82
80 /** 83 /**
81 * Successful. 84 * Successful.
82 */ 85 */
83 class http_status_2xx : public http_status { 86 class http_status_2xx : public http_status {
84 public: 87 public:
85 /** 88 /**
86 * @param s HTTP status message 89 * @param s HTTP status message
87 * @param m HTTP status message 90 * @param m HTTP status message
88 */ 91 */
89 explicit http_status_2xx(const string& s,const string& m) 92 explicit http_status_2xx(const string& s,const string& m)
90 : http_status(s,m) { } 93 : http_status(s,m) { }
91 }; 94 };
92 /** 95 /**
93 * OK. 96 * OK.
94 */ 97 */
95 class http_status_200 : public http_status_2xx { 98 class http_status_200 : public http_status_2xx {
96 public: 99 public:
97 /** 100 /**
98 * @param m HTTP status message 101 * @param m HTTP status message
99 */ 102 */
100 explicit http_status_200(const string& m) 103 explicit http_status_200(const string& m)
101 : http_status_2xx("200",m) { } 104 : http_status_2xx("200",m) { }
102 explicit http_status_200() 105 explicit http_status_200()
103 : http_status_2xx("200","OK") { } 106 : http_status_2xx("200","OK") { }
104 }; 107 };
105 /** 108 /**
106 * Created. 109 * Created.
107 */ 110 */
108 class http_status_201 : public http_status_2xx { 111 class http_status_201 : public http_status_2xx {
109 public: 112 public:
110 /** 113 /**
111 * @param m HTTP status message 114 * @param m HTTP status message
112 */ 115 */
113 explicit http_status_201(const string& m) 116 explicit http_status_201(const string& m)
114 : http_status_2xx("201",m) { } 117 : http_status_2xx("201",m) { }
115 explicit http_status_201() 118 explicit http_status_201()
116 : http_status_2xx("201","Created") { } 119 : http_status_2xx("201","Created") { }
117 }; 120 };
118 /** 121 /**
119 * Accepted. 122 * Accepted.
120 */ 123 */
121 class http_status_202 : public http_status_2xx { 124 class http_status_202 : public http_status_2xx {
122 public: 125 public:
123 /** 126 /**
124 * @param m HTTP status message 127 * @param m HTTP status message
125 */ 128 */
126 explicit http_status_202(const string& m) 129 explicit http_status_202(const string& m)
127 : http_status_2xx("202",m) { } 130 : http_status_2xx("202",m) { }
128 explicit http_status_202() 131 explicit http_status_202()
129 : http_status_2xx("202","Accepted") { } 132 : http_status_2xx("202","Accepted") { }
130 }; 133 };
131 /** 134 /**
132 * Non-authoritative infortmation. 135 * Non-authoritative infortmation.
133 */ 136 */
134 class http_status_203 : public http_status_2xx { 137 class http_status_203 : public http_status_2xx {
135 public: 138 public:
136 /** 139 /**
137 * @param m HTTP status message 140 * @param m HTTP status message
138 */ 141 */
139 explicit http_status_203(const string& m) 142 explicit http_status_203(const string& m)
140 : http_status_2xx("203",m) { } 143 : http_status_2xx("203",m) { }
141 explicit http_status_203() 144 explicit http_status_203()
142 : http_status_2xx("203","Non-authoritative information") { } 145 : http_status_2xx("203","Non-authoritative information") { }
143 }; 146 };
144 /** 147 /**
145 * No content. 148 * No content.
146 */ 149 */
147 class http_status_204 : public http_status_2xx { 150 class http_status_204 : public http_status_2xx {
148 public: 151 public:
149 /** 152 /**
150 * @param m HTTP status message 153 * @param m HTTP status message
151 */ 154 */
152 explicit http_status_204(const string& m) 155 explicit http_status_204(const string& m)
153 : http_status_2xx("204",m) { } 156 : http_status_2xx("204",m) { }
154 explicit http_status_204() 157 explicit http_status_204()
155 : http_status_2xx("204","No content") { } 158 : http_status_2xx("204","No content") { }
156 }; 159 };
157 /** 160 /**
158 * Reset content. 161 * Reset content.
159 */ 162 */
160 class http_status_205 : public http_status_2xx { 163 class http_status_205 : public http_status_2xx {
161 public: 164 public:
162 /** 165 /**
163 * @param m HTTP status message 166 * @param m HTTP status message
164 */ 167 */
165 explicit http_status_205(const string& m) 168 explicit http_status_205(const string& m)
166 : http_status_2xx("205",m) { } 169 : http_status_2xx("205",m) { }
167 explicit http_status_205() 170 explicit http_status_205()
168 : http_status_2xx("205","Reset content") { } 171 : http_status_2xx("205","Reset content") { }
169 }; 172 };
170 /** 173 /**
171 * Partial content. 174 * Partial content.
172 */ 175 */
173 class http_status_206 : public http_status_2xx { 176 class http_status_206 : public http_status_2xx {
174 public: 177 public:
175 /** 178 /**
176 * @param m HTTP status message 179 * @param m HTTP status message
177 */ 180 */
178 explicit http_status_206(const string& m) 181 explicit http_status_206(const string& m)
179 : http_status_2xx("206",m) { } 182 : http_status_2xx("206",m) { }
180 explicit http_status_206() 183 explicit http_status_206()
181 : http_status_2xx("206","Partial content") { } 184 : http_status_2xx("206","Partial content") { }
182 }; 185 };
183 186
184 /** 187 /**
185 * Redirection. 188 * Redirection.
186 */ 189 */
187 class http_status_3xx : public http_status { 190 class http_status_3xx : public http_status {
188 public: 191 public:
189 /** 192 /**
190 * @param s HTTP status 193 * @param s HTTP status
191 * @param m HTTP status message 194 * @param m HTTP status message
192 */ 195 */
193 explicit http_status_3xx(const string& s,const string& m) 196 explicit http_status_3xx(const string& s,const string& m)
194 : http_status(s,m) { } 197 : http_status(s,m) { }
195 }; 198 };
196 /** 199 /**
197 * Multiple choices. 200 * Multiple choices.
198 */ 201 */
199 class http_status_300 : public http_status_3xx { 202 class http_status_300 : public http_status_3xx {
200 public: 203 public:
201 /** 204 /**
202 * @param m HTTP status message 205 * @param m HTTP status message
203 */ 206 */
204 explicit http_status_300(const string& m) 207 explicit http_status_300(const string& m)
205 : http_status_3xx("300",m) { } 208 : http_status_3xx("300",m) { }
206 explicit http_status_300() 209 explicit http_status_300()
207 : http_status_3xx("300","Multiple choices") { } 210 : http_status_3xx("300","Multiple choices") { }
208 }; 211 };
209 /** 212 /**
210 * Moved permanently. 213 * Moved permanently.
211 */ 214 */
212 class http_status_301 : public http_status_3xx { 215 class http_status_301 : public http_status_3xx {
213 public: 216 public:
214 /** 217 /**
215 * @param m HTTP status message 218 * @param m HTTP status message
216 */ 219 */
217 explicit http_status_301(const string& m) 220 explicit http_status_301(const string& m)
218 : http_status_3xx("301",m) { } 221 : http_status_3xx("301",m) { }
219 explicit http_status_301() 222 explicit http_status_301()
220 : http_status_3xx("301","Moved permanently") { } 223 : http_status_3xx("301","Moved permanently") { }
221 }; 224 };
222 /** 225 /**
223 * Found. 226 * Found.
224 */ 227 */
225 class http_status_302 : public http_status_3xx { 228 class http_status_302 : public http_status_3xx {
226 public: 229 public:
227 /** 230 /**
228 * @param m HTTP status message 231 * @param m HTTP status message
229 */ 232 */
230 explicit http_status_302(const string& m) 233 explicit http_status_302(const string& m)
231 : http_status_3xx("302",m) { } 234 : http_status_3xx("302",m) { }
232 explicit http_status_302() 235 explicit http_status_302()
233 : http_status_3xx("302","Found") { } 236 : http_status_3xx("302","Found") { }
234 }; 237 };
235 /** 238 /**
236 * See other. 239 * See other.
237 */ 240 */
238 class http_status_303 : public http_status_3xx { 241 class http_status_303 : public http_status_3xx {
239 public: 242 public:
240 /** 243 /**
241 * @param m HTTP status message 244 * @param m HTTP status message
242 */ 245 */
243 explicit http_status_303(const string& m) 246 explicit http_status_303(const string& m)
244 : http_status_3xx("303",m) { } 247 : http_status_3xx("303",m) { }
245 explicit http_status_303() 248 explicit http_status_303()
246 : http_status_3xx("303","See other") { } 249 : http_status_3xx("303","See other") { }
247 }; 250 };
248 /** 251 /**
249 * Not modified. 252 * Not modified.
250 */ 253 */
251 class http_status_304 : public http_status_3xx { 254 class http_status_304 : public http_status_3xx {
252 public: 255 public:
253 /** 256 /**
254 * @param m HTTP status message 257 * @param m HTTP status message
255 */ 258 */
256 explicit http_status_304(const string& m) 259 explicit http_status_304(const string& m)
257 : http_status_3xx("304",m) { } 260 : http_status_3xx("304",m) { }
258 explicit http_status_304() 261 explicit http_status_304()
259 : http_status_3xx("304","Not modified") { } 262 : http_status_3xx("304","Not modified") { }
260 }; 263 };
261 /** 264 /**
262 * Use proxy. 265 * Use proxy.
263 */ 266 */
264 class http_status_305 : public http_status_3xx { 267 class http_status_305 : public http_status_3xx {
265 public: 268 public:
266 /** 269 /**
267 * @param m HTTP status message 270 * @param m HTTP status message
268 */ 271 */
269 explicit http_status_305(const string& m) 272 explicit http_status_305(const string& m)
270 : http_status_3xx("305",m) { } 273 : http_status_3xx("305",m) { }
271 explicit http_status_305() 274 explicit http_status_305()
272 : http_status_3xx("305","Use proxy") { } 275 : http_status_3xx("305","Use proxy") { }
273 }; 276 };
274 // 306 is unused and reserved 277 // 306 is unused and reserved
275 /** 278 /**
276 * Temporary redirect. 279 * Temporary redirect.
277 */ 280 */
278 class http_status_307 : public http_status_3xx { 281 class http_status_307 : public http_status_3xx {
279 public: 282 public:
280 /** 283 /**
281 * @param m HTTP status message 284 * @param m HTTP status message
282 */ 285 */
283 explicit http_status_307(const string& m) 286 explicit http_status_307(const string& m)
284 : http_status_3xx("307",m) { } 287 : http_status_3xx("307",m) { }
285 explicit http_status_307() 288 explicit http_status_307()
286 : http_status_3xx("307","Temporary redirect") { } 289 : http_status_3xx("307","Temporary redirect") { }
287 }; 290 };
288 291
289 /** 292 /**
290 * Error. 293 * Error.
291 */ 294 */
292 class http_status_4xx : public http_status { 295 class http_status_4xx : public http_status {
293 public: 296 public:
294 /** 297 /**
295 * @param s HTTP status 298 * @param s HTTP status
296 * @param m HTTP status message 299 * @param m HTTP status message
297 */ 300 */
298 explicit http_status_4xx(const string& s,const string& m) 301 explicit http_status_4xx(const string& s,const string& m)
299 : http_status(s,m) { } 302 : http_status(s,m) { }
300 }; 303 };
301 /** 304 /**
302 * Bad request. 305 * Bad request.
303 */ 306 */
304 class http_status_400 : public http_status_4xx { 307 class http_status_400 : public http_status_4xx {
305 public: 308 public:
306 /** 309 /**
307 * @param m HTTP status message 310 * @param m HTTP status message
308 */ 311 */
309 explicit http_status_400(const string& m) 312 explicit http_status_400(const string& m)
310 : http_status_4xx("400",m) { } 313 : http_status_4xx("400",m) { }
311 explicit http_status_400() 314 explicit http_status_400()
312 : http_status_4xx("400","Bad request") { } 315 : http_status_4xx("400","Bad request") { }
313 }; 316 };
314 /** 317 /**
315 * Unauthorized. 318 * Unauthorized.
316 */ 319 */
317 class http_status_401 : public http_status_4xx { 320 class http_status_401 : public http_status_4xx {
318 public: 321 public:
319 /** 322 /**
320 * @param m HTTP status message 323 * @param m HTTP status message
321 */ 324 */
322 explicit http_status_401(const string& m) 325 explicit http_status_401(const string& m)
323 : http_status_4xx("401",m) { } 326 : http_status_4xx("401",m) { }
324 explicit http_status_401() 327 explicit http_status_401()
325 : http_status_4xx("401","Unauthorized") { } 328 : http_status_4xx("401","Unauthorized") { }
326 }; 329 };
327 /** 330 /**
328 * Payment required. 331 * Payment required.
329 */ 332 */
330 class http_status_402 : public http_status_4xx { 333 class http_status_402 : public http_status_4xx {
331 public: 334 public:
332 /** 335 /**
333 * @param m HTTP status message 336 * @param m HTTP status message
334 */ 337 */
335 explicit http_status_402(const string& m) 338 explicit http_status_402(const string& m)
336 : http_status_4xx("402",m) { } 339 : http_status_4xx("402",m) { }
337 explicit http_status_402() 340 explicit http_status_402()
338 : http_status_4xx("402","Payment required") { } 341 : http_status_4xx("402","Payment required") { }
339 }; 342 };
340 /** 343 /**
341 * Forbidden. 344 * Forbidden.
342 */ 345 */
343 class http_status_403 : public http_status_4xx { 346 class http_status_403 : public http_status_4xx {
344 public: 347 public:
345 /** 348 /**
346 * @param m HTTP status message 349 * @param m HTTP status message
347 */ 350 */
348 explicit http_status_403(const string& m) 351 explicit http_status_403(const string& m)
349 : http_status_4xx("403",m) { } 352 : http_status_4xx("403",m) { }
350 explicit http_status_403() 353 explicit http_status_403()
351 : http_status_4xx("403","Forbidden") { } 354 : http_status_4xx("403","Forbidden") { }
352 }; 355 };
353 /** 356 /**
354 * Not found. 357 * Not found.
355 */ 358 */
356 class http_status_404 : public http_status_4xx { 359 class http_status_404 : public http_status_4xx {
357 public: 360 public:
358 /** 361 /**
359 * @param m HTTP status message 362 * @param m HTTP status message
360 */ 363 */
361 explicit http_status_404(const string& m) 364 explicit http_status_404(const string& m)
362 : http_status_4xx("404",m) { } 365 : http_status_4xx("404",m) { }
363 explicit http_status_404() 366 explicit http_status_404()
364 : http_status_4xx("404","Not found") { } 367 : http_status_4xx("404","Not found") { }
365 }; 368 };
366 /** 369 /**
367 * Method not allowed. 370 * Method not allowed.
368 */ 371 */
369 class http_status_405 : public http_status_4xx { 372 class http_status_405 : public http_status_4xx {
370 public: 373 public:
371 /** 374 /**
372 * @param m HTTP status message 375 * @param m HTTP status message
373 */ 376 */
374 explicit http_status_405(const string& m) 377 explicit http_status_405(const string& m)
375 : http_status_4xx("405",m) { } 378 : http_status_4xx("405",m) { }
376 explicit http_status_405() 379 explicit http_status_405()
377 : http_status_4xx("405","Method not allowed") { } 380 : http_status_4xx("405","Method not allowed") { }
378 }; 381 };
379 /** 382 /**
380 * Not acceptable. 383 * Not acceptable.
381 */ 384 */
382 class http_status_406 : public http_status_4xx { 385 class http_status_406 : public http_status_4xx {
383 public: 386 public:
384 /** 387 /**
385 * @param m HTTP status message 388 * @param m HTTP status message
386 */ 389 */
387 explicit http_status_406(const string& m) 390 explicit http_status_406(const string& m)
388 : http_status_4xx("406",m) { } 391 : http_status_4xx("406",m) { }
389 explicit http_status_406() 392 explicit http_status_406()
390 : http_status_4xx("406","Not acceptable") { } 393 : http_status_4xx("406","Not acceptable") { }
391 }; 394 };
392 /** 395 /**
393 * Proxy authentication required. 396 * Proxy authentication required.
394 */ 397 */
395 class http_status_407 : public http_status_4xx { 398 class http_status_407 : public http_status_4xx {
396 public: 399 public:
397 /** 400 /**
398 * @param m HTTP status message 401 * @param m HTTP status message
399 */ 402 */
400 explicit http_status_407(const string& m) 403 explicit http_status_407(const string& m)
401 : http_status_4xx("407",m) { } 404 : http_status_4xx("407",m) { }
402 explicit http_status_407() 405 explicit http_status_407()
403 : http_status_4xx("407","Proxy authentication required") { } 406 : http_status_4xx("407","Proxy authentication required") { }
404 }; 407 };
405 /** 408 /**
406 * Request timeout. 409 * Request timeout.
407 */ 410 */
408 class http_status_408 : public http_status_4xx { 411 class http_status_408 : public http_status_4xx {
409 public: 412 public:
410 /** 413 /**
411 * @param m HTTP status message 414 * @param m HTTP status message
412 */ 415 */
413 explicit http_status_408(const string& m) 416 explicit http_status_408(const string& m)
414 : http_status_4xx("408",m) { } 417 : http_status_4xx("408",m) { }
415 explicit http_status_408() 418 explicit http_status_408()
416 : http_status_4xx("408","Request timeout") { } 419 : http_status_4xx("408","Request timeout") { }
417 }; 420 };
418 /** 421 /**
419 * Conflict. 422 * Conflict.
420 */ 423 */
421 class http_status_409 : public http_status_4xx { 424 class http_status_409 : public http_status_4xx {
422 public: 425 public:
423 /** 426 /**
424 * @param m HTTP status message 427 * @param m HTTP status message
425 */ 428 */
426 explicit http_status_409(const string& m) 429 explicit http_status_409(const string& m)
427 : http_status_4xx("409",m) { } 430 : http_status_4xx("409",m) { }
428 explicit http_status_409() 431 explicit http_status_409()
429 : http_status_4xx("409","Conflict") { } 432 : http_status_4xx("409","Conflict") { }
430 }; 433 };
431 /** 434 /**
432 * Gone. 435 * Gone.
433 */ 436 */
434 class http_status_410 : public http_status_4xx { 437 class http_status_410 : public http_status_4xx {
435 public: 438 public:
436 /** 439 /**
437 * @param m HTTP status message 440 * @param m HTTP status message
438 */ 441 */
439 explicit http_status_410(const string& m) 442 explicit http_status_410(const string& m)
440 : http_status_4xx("410",m) { } 443 : http_status_4xx("410",m) { }
441 explicit http_status_410() 444 explicit http_status_410()
442 : http_status_4xx("410","Gone") { } 445 : http_status_4xx("410","Gone") { }
443 }; 446 };
444 /** 447 /**
445 * Length required. 448 * Length required.
446 */ 449 */
447 class http_status_411 : public http_status_4xx { 450 class http_status_411 : public http_status_4xx {
448 public: 451 public:
449 /** 452 /**
450 * @param m HTTP status message 453 * @param m HTTP status message
451 */ 454 */
452 explicit http_status_411(const string& m) 455 explicit http_status_411(const string& m)
453 : http_status_4xx("411",m) { } 456 : http_status_4xx("411",m) { }
454 explicit http_status_411() 457 explicit http_status_411()
455 : http_status_4xx("411","Length required") { } 458 : http_status_4xx("411","Length required") { }
456 }; 459 };
457 /** 460 /**
458 * Precondition failed. 461 * Precondition failed.
459 */ 462 */
460 class http_status_412 : public http_status_4xx { 463 class http_status_412 : public http_status_4xx {
461 public: 464 public:
462 /** 465 /**
463 * @param m HTTP status message 466 * @param m HTTP status message
464 */ 467 */
465 explicit http_status_412(const string& m) 468 explicit http_status_412(const string& m)
466 : http_status_4xx("412",m) { } 469 : http_status_4xx("412",m) { }
467 explicit http_status_412() 470 explicit http_status_412()
468 : http_status_4xx("412","Precondition failed") { } 471 : http_status_4xx("412","Precondition failed") { }
469 }; 472 };
470 /** 473 /**
471 * Request entity too large. 474 * Request entity too large.
472 */ 475 */
473 class http_status_413 : public http_status_4xx { 476 class http_status_413 : public http_status_4xx {
474 public: 477 public:
475 /** 478 /**
476 * @param m HTTP status message 479 * @param m HTTP status message
477 */ 480 */
478 explicit http_status_413(const string& m) 481 explicit http_status_413(const string& m)
479 : http_status_4xx("413",m) { } 482 : http_status_4xx("413",m) { }
480 explicit http_status_413() 483 explicit http_status_413()
481 : http_status_4xx("413","Request entity too large") { } 484 : http_status_4xx("413","Request entity too large") { }
482 }; 485 };
483 /** 486 /**
484 * Request URI too long. 487 * Request URI too long.
485 */ 488 */
486 class http_status_414 : public http_status_4xx { 489 class http_status_414 : public http_status_4xx {
487 public: 490 public:
488 /** 491 /**
489 * @param m HTTP status message 492 * @param m HTTP status message
490 */ 493 */
491 explicit http_status_414(const string& m) 494 explicit http_status_414(const string& m)
492 : http_status_4xx("414",m) { } 495 : http_status_4xx("414",m) { }
493 explicit http_status_414() 496 explicit http_status_414()
494 : http_status_4xx("414","Request URI too long") { } 497 : http_status_4xx("414","Request URI too long") { }
495 }; 498 };
496 /** 499 /**
497 * Unsupported media type. 500 * Unsupported media type.
498 */ 501 */
499 class http_status_415 : public http_status_4xx { 502 class http_status_415 : public http_status_4xx {
500 public: 503 public:
501 /** 504 /**
502 * @param m HTTP status message 505 * @param m HTTP status message
503 */ 506 */
504 explicit http_status_415(const string& m) 507 explicit http_status_415(const string& m)
505 : http_status_4xx("415",m) { } 508 : http_status_4xx("415",m) { }
506 explicit http_status_415() 509 explicit http_status_415()
507 : http_status_4xx("415","Unsupported media type") { } 510 : http_status_4xx("415","Unsupported media type") { }
508 }; 511 };
509 /** 512 /**
510 * Requested range not satisfiable. 513 * Requested range not satisfiable.
511 */ 514 */
512 class http_status_416 : public http_status_4xx { 515 class http_status_416 : public http_status_4xx {
513 public: 516 public:
514 /** 517 /**
515 * @param m HTTP status message 518 * @param m HTTP status message
516 */ 519 */
517 explicit http_status_416(const string& m) 520 explicit http_status_416(const string& m)
518 : http_status_4xx("416",m) { } 521 : http_status_4xx("416",m) { }
519 explicit http_status_416() 522 explicit http_status_416()
520 : http_status_4xx("416","Requested range not satisfiable") { } 523 : http_status_4xx("416","Requested range not satisfiable") { }
521 }; 524 };
522 /** 525 /**
523 * Expectation failed. 526 * Expectation failed.
524 */ 527 */
525 class http_status_417 : public http_status_4xx { 528 class http_status_417 : public http_status_4xx {
526 public: 529 public:
527 /** 530 /**
528 * @param m HTTP status message 531 * @param m HTTP status message
529 */ 532 */
530 explicit http_status_417(const string& m) 533 explicit http_status_417(const string& m)
531 : http_status_4xx("417",m) { } 534 : http_status_4xx("417",m) { }
532 explicit http_status_417() 535 explicit http_status_417()
533 : http_status_4xx("417","Expectation failed") { } 536 : http_status_4xx("417","Expectation failed") { }
534 }; 537 };
535 538
536 /** 539 /**
537 * Server error. 540 * Server error.
538 */ 541 */
539 class http_status_5xx : public http_status { 542 class http_status_5xx : public http_status {
540 public: 543 public:
541 /** 544 /**
542 * @param s HTTP status 545 * @param s HTTP status
543 * @param m HTTP status message 546 * @param m HTTP status message
544 */ 547 */
545 explicit http_status_5xx(const string& s,const string& m) 548 explicit http_status_5xx(const string& s,const string& m)
546 : http_status(s,m) { } 549 : http_status(s,m) { }
547 }; 550 };
548 /** 551 /**
549 * Internal server error. 552 * Internal server error.
550 */ 553 */
551 class http_status_500 : public http_status_5xx { 554 class http_status_500 : public http_status_5xx {
552 public: 555 public:
553 /** 556 /**
554 * @param m HTTP status message 557 * @param m HTTP status message
555 */ 558 */
556 explicit http_status_500(const string& m) 559 explicit http_status_500(const string& m)
557 : http_status_5xx("500",m) { } 560 : http_status_5xx("500",m) { }
558 explicit http_status_500() 561 explicit http_status_500()
559 : http_status_5xx("500","Internal server error") { } 562 : http_status_5xx("500","Internal server error") { }
560 }; 563 };
561 /** 564 /**
562 * Not implemented. 565 * Not implemented.
563 */ 566 */
564 class http_status_501 : public http_status_5xx { 567 class http_status_501 : public http_status_5xx {
565 public: 568 public:
566 /** 569 /**
567 * @param m HTTP status message 570 * @param m HTTP status message
568 */ 571 */
569 explicit http_status_501(const string& m) 572 explicit http_status_501(const string& m)
570 : http_status_5xx("501",m) { } 573 : http_status_5xx("501",m) { }
571 explicit http_status_501() 574 explicit http_status_501()
572 : http_status_5xx("501","Not implemented") { } 575 : http_status_5xx("501","Not implemented") { }
573 }; 576 };
574 /** 577 /**
575 * Bad gateway. 578 * Bad gateway.
576 */ 579 */
577 class http_status_502 : public http_status_5xx { 580 class http_status_502 : public http_status_5xx {
578 public: 581 public:
579 /** 582 /**
580 * @param m HTTP status message 583 * @param m HTTP status message
581 */ 584 */
582 explicit http_status_502(const string& m) 585 explicit http_status_502(const string& m)
583 : http_status_5xx("502",m) { } 586 : http_status_5xx("502",m) { }
584 explicit http_status_502() 587 explicit http_status_502()
585 : http_status_5xx("502","Bad gateway") { } 588 : http_status_5xx("502","Bad gateway") { }
586 }; 589 };
587 /** 590 /**
588 * Service unavailable. 591 * Service unavailable.
589 */ 592 */
590 class http_status_503 : public http_status_5xx { 593 class http_status_503 : public http_status_5xx {
591 public: 594 public:
592 /** 595 /**
593 * @param m HTTP status message 596 * @param m HTTP status message
594 */ 597 */
595 explicit http_status_503(const string& m) 598 explicit http_status_503(const string& m)
596 : http_status_5xx("503",m) { } 599 : http_status_5xx("503",m) { }
597 explicit http_status_503() 600 explicit http_status_503()
598 : http_status_5xx("503","Service unavailable") { } 601 : http_status_5xx("503","Service unavailable") { }
599 }; 602 };
600 /** 603 /**
601 * Gateway timeout. 604 * Gateway timeout.
602 */ 605 */
603 class http_status_504 : public http_status_5xx { 606 class http_status_504 : public http_status_5xx {
604 public: 607 public:
605 /** 608 /**
606 * @param m HTTP status message 609 * @param m HTTP status message
607 */ 610 */
608 explicit http_status_504(const string& m) 611 explicit http_status_504(const string& m)
609 : http_status_5xx("504",m) { } 612 : http_status_5xx("504",m) { }
610 explicit http_status_504() 613 explicit http_status_504()
611 : http_status_5xx("504","Gateway timeout") { } 614 : http_status_5xx("504","Gateway timeout") { }
612 }; 615 };
613 /** 616 /**
614 * HTTP version not supported. 617 * HTTP version not supported.
615 */ 618 */
616 class http_status_505 : public http_status_5xx { 619 class http_status_505 : public http_status_5xx {
617 public: 620 public:
618 /** 621 /**
619 * @param m HTTP status message 622 * @param m HTTP status message
620 */ 623 */
621 explicit http_status_505(const string& m) 624 explicit http_status_505(const string& m)
622 : http_status_5xx("505",m) { } 625 : http_status_5xx("505",m) { }
623 explicit http_status_505() 626 explicit http_status_505()
624 : http_status_5xx("505","HTTP version not supported") { } 627 : http_status_5xx("505","HTTP version not supported") { }
625 }; 628 };
626 629
627 // Aliases 630 // Aliases
628 631
629 /** 632 /**
630 * Convenience alias for informational http status exceptions 633 * Convenience alias for informational http status exceptions
631 */ 634 */
632 typedef http_status_1xx http_status_informational; 635 typedef http_status_1xx http_status_informational;
633 /** 636 /**
634 * @see http_status_100 637 * @see http_status_100
635 */ 638 */
636 typedef http_status_100 http_status_continue; 639 typedef http_status_100 http_status_continue;
637 /** 640 /**
638 * @see http_status_101 641 * @see http_status_101
639 */ 642 */
640 typedef http_status_101 http_status_switching_protocols; 643 typedef http_status_101 http_status_switching_protocols;
641 644
642 /** 645 /**
643 * Convenience alias for success http status exceptions 646 * Convenience alias for success http status exceptions
644 */ 647 */
645 typedef http_status_2xx http_status_sucessful; 648 typedef http_status_2xx http_status_sucessful;
646 /** 649 /**
647 * @see http_status_200 650 * @see http_status_200
648 */ 651 */
649 typedef http_status_200 http_status_ok; 652 typedef http_status_200 http_status_ok;
650 /** 653 /**
651 * @see http_status_201 654 * @see http_status_201
652 */ 655 */
653 typedef http_status_201 http_status_created; 656 typedef http_status_201 http_status_created;
654 /** 657 /**
655 * @see http_status_202 658 * @see http_status_202
656 */ 659 */
657 typedef http_status_202 http_status_accepted; 660 typedef http_status_202 http_status_accepted;
658 /** 661 /**
659 * @see http_status_203 662 * @see http_status_203
660 */ 663 */
661 typedef http_status_203 http_status_non_authoritative_information; 664 typedef http_status_203 http_status_non_authoritative_information;
662 /** 665 /**
663 * @see http_status_204 666 * @see http_status_204
664 */ 667 */
665 typedef http_status_204 http_status_no_content; 668 typedef http_status_204 http_status_no_content;
666 /** 669 /**
667 * @see http_status_205 670 * @see http_status_205
668 */ 671 */
669 typedef http_status_205 http_status_reset_content; 672 typedef http_status_205 http_status_reset_content;
670 /** 673 /**
671 * @see http_status_206 674 * @see http_status_206
672 */ 675 */
673 typedef http_status_206 http_status_partial_content; 676 typedef http_status_206 http_status_partial_content;
674 677
675 /** 678 /**
676 * Convenience alias for redirection http status exceptions 679 * Convenience alias for redirection http status exceptions
677 */ 680 */
678 typedef http_status_3xx http_status_redirection; 681 typedef http_status_3xx http_status_redirection;
679 /** 682 /**
680 * @see http_status_200 683 * @see http_status_200
681 */ 684 */
682 typedef http_status_300 http_status_multiple_choices; 685 typedef http_status_300 http_status_multiple_choices;
683 /** 686 /**
684 * @see http_status_301 687 * @see http_status_301
685 */ 688 */
686 typedef http_status_301 http_status_moved_permanently; 689 typedef http_status_301 http_status_moved_permanently;
687 /** 690 /**
688 * @see http_status_302 691 * @see http_status_302
689 */ 692 */
690 typedef http_status_302 http_status_found; 693 typedef http_status_302 http_status_found;
691 /** 694 /**
692 * @see http_status_303 695 * @see http_status_303
693 */ 696 */
694 typedef http_status_303 http_status_see_other; 697 typedef http_status_303 http_status_see_other;
695 /** 698 /**
696 * @see http_status_304 699 * @see http_status_304
697 */ 700 */
698 typedef http_status_304 http_status_not_modified; 701 typedef http_status_304 http_status_not_modified;
699 /** 702 /**
700 * @see http_status_305 703 * @see http_status_305
701 */ 704 */
702 typedef http_status_305 http_status_use_proxy; 705 typedef http_status_305 http_status_use_proxy;
703 // 306 is unused and reserved 706 // 306 is unused and reserved
704 /** 707 /**
705 * @see http_status_307 708 * @see http_status_307
706 */ 709 */
707 typedef http_status_307 http_status_temporary_redirect; 710 typedef http_status_307 http_status_temporary_redirect;
708 711
709 /** 712 /**
710 * Convenience alias for client error http exceptions 713 * Convenience alias for client error http exceptions
711 */ 714 */
712 typedef http_status_4xx http_status_client_error; 715 typedef http_status_4xx http_status_client_error;
713 /** 716 /**
714 * @see http_status_400 717 * @see http_status_400
715 */ 718 */
716 typedef http_status_400 http_status_bad_request; 719 typedef http_status_400 http_status_bad_request;
717 /** 720 /**
718 * @see http_status_401 721 * @see http_status_401
719 */ 722 */
720 typedef http_status_401 http_status_unauthorized; 723 typedef http_status_401 http_status_unauthorized;
721 /** 724 /**
722 * @see http_status_402 725 * @see http_status_402
723 */ 726 */
724 typedef http_status_402 http_status_payment_required; 727 typedef http_status_402 http_status_payment_required;
725 /** 728 /**
726 * @see http_status_403 729 * @see http_status_403
727 */ 730 */
728 typedef http_status_403 http_status_forbidden; 731 typedef http_status_403 http_status_forbidden;
729 /** 732 /**
730 * @see http_status_404 733 * @see http_status_404
731 */ 734 */
732 typedef http_status_404 http_status_not_found; 735 typedef http_status_404 http_status_not_found;
733 /** 736 /**
734 * @see http_status_405 737 * @see http_status_405
735 */ 738 */
736 typedef http_status_405 http_status_method_not_allowed; 739 typedef http_status_405 http_status_method_not_allowed;
737 /** 740 /**
738 * @see http_status_406 741 * @see http_status_406
739 */ 742 */
740 typedef http_status_406 http_status_not_acceptable; 743 typedef http_status_406 http_status_not_acceptable;
741 /** 744 /**
742 * @see http_status_407 745 * @see http_status_407
743 */ 746 */
744 typedef http_status_407 http_status_proxy_authentication_required; 747 typedef http_status_407 http_status_proxy_authentication_required;
745 /** 748 /**
746 * @see http_status_408 749 * @see http_status_408
747 */ 750 */
748 typedef http_status_408 http_status_request_timeout; 751 typedef http_status_408 http_status_request_timeout;
749 /** 752 /**
750 * @see http_status_409 753 * @see http_status_409
751 */ 754 */
752 typedef http_status_409 http_status_conflict; 755 typedef http_status_409 http_status_conflict;
753 /** 756 /**
754 * @see http_status_410 757 * @see http_status_410
755 */ 758 */
756 typedef http_status_410 http_status_gone; 759 typedef http_status_410 http_status_gone;
757 /** 760 /**
758 * @see http_status_411 761 * @see http_status_411
759 */ 762 */
760 typedef http_status_411 http_status_length_required; 763 typedef http_status_411 http_status_length_required;
761 /** 764 /**
762 * @see http_status_412 765 * @see http_status_412
763 */ 766 */
764 typedef http_status_412 http_status_precondition_failed; 767 typedef http_status_412 http_status_precondition_failed;
765 /** 768 /**
766 * @see http_status_413 769 * @see http_status_413
767 */ 770 */
768 typedef http_status_413 http_status_request_entity_too_large; 771 typedef http_status_413 http_status_request_entity_too_large;
769 /** 772 /**
770 * @see http_status_414 773 * @see http_status_414
771 */ 774 */
772 typedef http_status_414 http_status_requrest_uri_too_long; 775 typedef http_status_414 http_status_requrest_uri_too_long;
773 /** 776 /**
774 * @see http_status_415 777 * @see http_status_415
775 */ 778 */
776 typedef http_status_415 http_status_unsupported_media_type; 779 typedef http_status_415 http_status_unsupported_media_type;
777 /** 780 /**
778 * @see http_status_416 781 * @see http_status_416
779 */ 782 */
780 typedef http_status_416 http_status_required_range_not_satisfiable; 783 typedef http_status_416 http_status_required_range_not_satisfiable;