• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>http::error</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
8<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
9<link rel="prev" href="boost__beast__async_teardown.html" title="async_teardown">
10<link rel="next" href="boost__beast__http__field.html" title="http::field">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="boost__beast__async_teardown.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__field.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="beast.ref.boost__beast__http__error"></a><a class="link" href="boost__beast__http__error.html" title="http::error">http::error</a>
28</h4></div></div></div>
29<p>
30        <a class="indexterm" name="idm46057510612512"></a>
31      </p>
32<p>
33        Error codes returned from HTTP algorithms and operations.
34      </p>
35<h5>
36<a name="beast.ref.boost__beast__http__error.h0"></a>
37        <span class="phrase"><a name="beast.ref.boost__beast__http__error.synopsis"></a></span><a class="link" href="boost__beast__http__error.html#beast.ref.boost__beast__http__error.synopsis">Synopsis</a>
38      </h5>
39<p>
40        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/error.hpp" target="_top">boost/beast/http/error.hpp</a>&gt;</code>
41      </p>
42<pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">error</span>
43</pre>
44<h5>
45<a name="beast.ref.boost__beast__http__error.h1"></a>
46        <span class="phrase"><a name="beast.ref.boost__beast__http__error.values"></a></span><a class="link" href="boost__beast__http__error.html#beast.ref.boost__beast__http__error.values">Values</a>
47      </h5>
48<div class="informaltable"><table class="table">
49<colgroup>
50<col>
51<col>
52</colgroup>
53<thead><tr>
54<th>
55                <p>
56                  Name
57                </p>
58              </th>
59<th>
60                <p>
61                  Description
62                </p>
63              </th>
64</tr></thead>
65<tbody>
66<tr>
67<td>
68                <p>
69                  <code class="computeroutput"><span class="identifier">end_of_stream</span></code>
70                </p>
71              </td>
72<td>
73                <p>
74                  The end of the stream was reached.
75                </p>
76                <p>
77                  This error is returned when attempting to read HTTP data, and the
78                  stream returns the error <code class="computeroutput"><span class="identifier">net</span><span class="special">::</span><span class="identifier">error</span><span class="special">::</span><span class="identifier">eof</span></code>
79                  before any octets corresponding to a new HTTP message have been
80                  received.
81                </p>
82              </td>
83</tr>
84<tr>
85<td>
86                <p>
87                  <code class="computeroutput"><span class="identifier">partial_message</span></code>
88                </p>
89              </td>
90<td>
91                <p>
92                  The incoming message is incomplete.
93                </p>
94                <p>
95                  This happens when the end of stream is reached during parsing and
96                  some octets have been received, but not the entire message.
97                </p>
98              </td>
99</tr>
100<tr>
101<td>
102                <p>
103                  <code class="computeroutput"><span class="identifier">need_more</span></code>
104                </p>
105              </td>
106<td>
107                <p>
108                  Additional buffers are required.
109                </p>
110                <p>
111                  This error is returned during parsing when additional octets are
112                  needed. The caller should append more data to the existing buffer
113                  and retry the parse operaetion.
114                </p>
115              </td>
116</tr>
117<tr>
118<td>
119                <p>
120                  <code class="computeroutput"><span class="identifier">unexpected_body</span></code>
121                </p>
122              </td>
123<td>
124                <p>
125                  An unexpected body was encountered during parsing.
126                </p>
127                <p>
128                  This error is returned when attempting to parse body octets into
129                  a message container which has the @ref empty_body body type.
130                </p>
131                <p>
132                  @see empty_body
133                </p>
134              </td>
135</tr>
136<tr>
137<td>
138                <p>
139                  <code class="computeroutput"><span class="identifier">need_buffer</span></code>
140                </p>
141              </td>
142<td>
143                <p>
144                  Additional buffers are required.
145                </p>
146                <p>
147                  This error is returned under the following conditions:
148                </p>
149                <p>
150                  @li During serialization when using @ref buffer_body. The caller
151                  should update the body to point to a new buffer or indicate that
152                  there are no more octets in the body.
153                </p>
154                <p>
155                  @li During parsing when using @ref buffer_body. The caller should
156                  update the body to point to a new storage area to receive additional
157                  body octets.
158                </p>
159              </td>
160</tr>
161<tr>
162<td>
163                <p>
164                  <code class="computeroutput"><span class="identifier">end_of_chunk</span></code>
165                </p>
166              </td>
167<td>
168                <p>
169                  The end of a chunk was reached.
170                </p>
171              </td>
172</tr>
173<tr>
174<td>
175                <p>
176                  <code class="computeroutput"><span class="identifier">buffer_overflow</span></code>
177                </p>
178              </td>
179<td>
180                <p>
181                  Buffer maximum exceeded.
182                </p>
183                <p>
184                  This error is returned when reading HTTP content into a dynamic
185                  buffer, and the operation would exceed the maximum size of the
186                  buffer.
187                </p>
188              </td>
189</tr>
190<tr>
191<td>
192                <p>
193                  <code class="computeroutput"><span class="identifier">header_limit</span></code>
194                </p>
195              </td>
196<td>
197                <p>
198                  Header limit exceeded.
199                </p>
200                <p>
201                  The parser detected an incoming message header which exceeded a
202                  configured limit.
203                </p>
204              </td>
205</tr>
206<tr>
207<td>
208                <p>
209                  <code class="computeroutput"><span class="identifier">body_limit</span></code>
210                </p>
211              </td>
212<td>
213                <p>
214                  Body limit exceeded.
215                </p>
216                <p>
217                  The parser detected an incoming message body which exceeded a configured
218                  limit.
219                </p>
220              </td>
221</tr>
222<tr>
223<td>
224                <p>
225                  <code class="computeroutput"><span class="identifier">bad_alloc</span></code>
226                </p>
227              </td>
228<td>
229                <p>
230                  A memory allocation failed.
231                </p>
232                <p>
233                  When basic_fields throws std::bad_alloc, it is converted into this
234                  error by @ref parser.
235                </p>
236              </td>
237</tr>
238<tr>
239<td>
240                <p>
241                  <code class="computeroutput"><span class="identifier">bad_line_ending</span></code>
242                </p>
243              </td>
244<td>
245                <p>
246                  The line ending was malformed.
247                </p>
248              </td>
249</tr>
250<tr>
251<td>
252                <p>
253                  <code class="computeroutput"><span class="identifier">bad_method</span></code>
254                </p>
255              </td>
256<td>
257                <p>
258                  The method is invalid.
259                </p>
260              </td>
261</tr>
262<tr>
263<td>
264                <p>
265                  <code class="computeroutput"><span class="identifier">bad_target</span></code>
266                </p>
267              </td>
268<td>
269                <p>
270                  The request-target is invalid.
271                </p>
272              </td>
273</tr>
274<tr>
275<td>
276                <p>
277                  <code class="computeroutput"><span class="identifier">bad_version</span></code>
278                </p>
279              </td>
280<td>
281                <p>
282                  The HTTP-version is invalid.
283                </p>
284              </td>
285</tr>
286<tr>
287<td>
288                <p>
289                  <code class="computeroutput"><span class="identifier">bad_status</span></code>
290                </p>
291              </td>
292<td>
293                <p>
294                  The status-code is invalid.
295                </p>
296              </td>
297</tr>
298<tr>
299<td>
300                <p>
301                  <code class="computeroutput"><span class="identifier">bad_reason</span></code>
302                </p>
303              </td>
304<td>
305                <p>
306                  The reason-phrase is invalid.
307                </p>
308              </td>
309</tr>
310<tr>
311<td>
312                <p>
313                  <code class="computeroutput"><span class="identifier">bad_field</span></code>
314                </p>
315              </td>
316<td>
317                <p>
318                  The field name is invalid.
319                </p>
320              </td>
321</tr>
322<tr>
323<td>
324                <p>
325                  <code class="computeroutput"><span class="identifier">bad_value</span></code>
326                </p>
327              </td>
328<td>
329                <p>
330                  The field value is invalid.
331                </p>
332              </td>
333</tr>
334<tr>
335<td>
336                <p>
337                  <code class="computeroutput"><span class="identifier">bad_content_length</span></code>
338                </p>
339              </td>
340<td>
341                <p>
342                  The Content-Length is invalid.
343                </p>
344              </td>
345</tr>
346<tr>
347<td>
348                <p>
349                  <code class="computeroutput"><span class="identifier">bad_transfer_encoding</span></code>
350                </p>
351              </td>
352<td>
353                <p>
354                  The Transfer-Encoding is invalid.
355                </p>
356              </td>
357</tr>
358<tr>
359<td>
360                <p>
361                  <code class="computeroutput"><span class="identifier">bad_chunk</span></code>
362                </p>
363              </td>
364<td>
365                <p>
366                  The chunk syntax is invalid.
367                </p>
368              </td>
369</tr>
370<tr>
371<td>
372                <p>
373                  <code class="computeroutput"><span class="identifier">bad_chunk_extension</span></code>
374                </p>
375              </td>
376<td>
377                <p>
378                  The chunk extension is invalid.
379                </p>
380              </td>
381</tr>
382<tr>
383<td>
384                <p>
385                  <code class="computeroutput"><span class="identifier">bad_obs_fold</span></code>
386                </p>
387              </td>
388<td>
389                <p>
390                  An obs-fold exceeded an internal limit.
391                </p>
392              </td>
393</tr>
394<tr>
395<td>
396                <p>
397                  <code class="computeroutput"><span class="identifier">stale_parser</span></code>
398                </p>
399              </td>
400<td>
401                <p>
402                  The parser is stale.
403                </p>
404                <p>
405                  This happens when attempting to re-use a parser that has already
406                  completed parsing a message. Programs must construct a new parser
407                  for each message. This can be easily done by storing the parser
408                  in an boost or std::optional container.
409                </p>
410              </td>
411</tr>
412<tr>
413<td>
414                <p>
415                  <code class="computeroutput"><span class="identifier">short_read</span></code>
416                </p>
417              </td>
418<td>
419                <p>
420                  The message body is shorter than expected.
421                </p>
422                <p>
423                  This error is returned by @ref file_body when an unexpected unexpected
424                  end-of-file condition is encountered while trying to read from
425                  the file.
426                </p>
427              </td>
428</tr>
429</tbody>
430</table></div>
431<h5>
432<a name="beast.ref.boost__beast__http__error.h2"></a>
433        <span class="phrase"><a name="beast.ref.boost__beast__http__error.description"></a></span><a class="link" href="boost__beast__http__error.html#beast.ref.boost__beast__http__error.description">Description</a>
434      </h5>
435</div>
436<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
437<td align="left"></td>
438<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
439      Falco<p>
440        Distributed under the Boost Software License, Version 1.0. (See accompanying
441        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
442      </p>
443</div></td>
444</tr></table>
445<hr>
446<div class="spirit-nav">
447<a accesskey="p" href="boost__beast__async_teardown.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__field.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
448</div>
449</body>
450</html>
451