forked from fhessel/esp32_https_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasshttpsserver_1_1HTTPBodyParser.html
More file actions
367 lines (344 loc) · 18.4 KB
/
Copy pathclasshttpsserver_1_1HTTPBodyParser.html
File metadata and controls
367 lines (344 loc) · 18.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32 HTTPS Server: httpsserver::HTTPBodyParser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ESP32 HTTPS Server
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classhttpsserver_1_1HTTPBodyParser.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="classhttpsserver_1_1HTTPBodyParser-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">httpsserver::HTTPBodyParser Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <<a class="el" href="HTTPBodyParser_8hpp_source.html">HTTPBodyParser.hpp</a>></code></p>
<div class="dynheader">
Inheritance diagram for httpsserver::HTTPBodyParser:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPBodyParser__inherit__graph.png" border="0" usemap="#httpsserver_1_1HTTPBodyParser_inherit__map" alt="Inheritance graph"/></div>
<map name="httpsserver_1_1HTTPBodyParser_inherit__map" id="httpsserver_1_1HTTPBodyParser_inherit__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1HTTPMultipartBodyParser.html" title="httpsserver::HTTPMultipart\lBodyParser" alt="" coords="5,80,185,121"/>
<area shape="rect" id="node3" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html" title="httpsserver::HTTPURLEncoded\lBodyParser" alt="" coords="210,80,418,121"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for httpsserver::HTTPBodyParser:</div>
<div class="dyncontent">
<div class="center"><img src="classhttpsserver_1_1HTTPBodyParser__coll__graph.png" border="0" usemap="#httpsserver_1_1HTTPBodyParser_coll__map" alt="Collaboration graph"/></div>
<map name="httpsserver_1_1HTTPBodyParser_coll__map" id="httpsserver_1_1HTTPBodyParser_coll__map">
<area shape="rect" id="node2" href="classhttpsserver_1_1HTTPRequest.html" title="Represents the request stream for an HTTP request. " alt="" coords="15,5,194,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abb44c46fe8f00f6df110f76f9ada774f"><td class="memItemLeft" align="right" valign="top"><a id="abb44c46fe8f00f6df110f76f9ada774f"></a>
 </td><td class="memItemRight" valign="bottom"><b>HTTPBodyParser</b> (<a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> *req)</td></tr>
<tr class="separator:abb44c46fe8f00f6df110f76f9ada774f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a47c2b28f720966b386ed00234940d421"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a47c2b28f720966b386ed00234940d421">nextField</a> ()=0</td></tr>
<tr class="separator:a47c2b28f720966b386ed00234940d421"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7da91747462ac94a57e5d690c6c4793c"><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a7da91747462ac94a57e5d690c6c4793c">getFieldName</a> ()=0</td></tr>
<tr class="separator:a7da91747462ac94a57e5d690c6c4793c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a99cbbb46113e578f81964c15a8af1002"><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a99cbbb46113e578f81964c15a8af1002">getFieldFilename</a> ()=0</td></tr>
<tr class="separator:a99cbbb46113e578f81964c15a8af1002"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3cfd999240dacfea2c4f98161b2553ec"><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a3cfd999240dacfea2c4f98161b2553ec">getFieldMimeType</a> ()=0</td></tr>
<tr class="separator:a3cfd999240dacfea2c4f98161b2553ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a968d4dc0644929a491d1ca1fcc8d48de"><td class="memItemLeft" align="right" valign="top">virtual size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a968d4dc0644929a491d1ca1fcc8d48de">read</a> (byte *buffer, size_t bufferSize)=0</td></tr>
<tr class="separator:a968d4dc0644929a491d1ca1fcc8d48de"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad59e73f15316544265b95cf50141d2be"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#ad59e73f15316544265b95cf50141d2be">endOfField</a> ()=0</td></tr>
<tr class="separator:ad59e73f15316544265b95cf50141d2be"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa8a7cf15c1239dbaa8d9678df1745af5"><td class="memItemLeft" align="right" valign="top"><a id="aa8a7cf15c1239dbaa8d9678df1745af5"></a>
const size_t </td><td class="memItemRight" valign="bottom"><b>unknownLength</b> = 0x7ffffffe</td></tr>
<tr class="separator:aa8a7cf15c1239dbaa8d9678df1745af5"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a538423cc74c807d939365b68ac7f4857"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html#a538423cc74c807d939365b68ac7f4857">_request</a></td></tr>
<tr class="separator:a538423cc74c807d939365b68ac7f4857"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Superclass for various body parser implementations that can be used to interpret http-specific bodies (like x-www-form-urlencoded or multipart/form-data)</p>
<p>To allow for arbitrary body length, the interface of the body parser provides access to one underlying "field" at a time. A field may be a value of the urlencoded string or a part of a multipart message.</p>
<p>Using next() proceeds to the next field. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ad59e73f15316544265b95cf50141d2be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad59e73f15316544265b95cf50141d2be">◆ </a></span>endOfField()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool httpsserver::HTTPBodyParser::endOfField </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true when all field data has been read </p>
<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#ada05c171ed398accbdfc50793043d79c">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#af640e2a45d491b01e43f66cd00dd58ea">httpsserver::HTTPMultipartBodyParser</a>.</p>
</div>
</div>
<a id="a99cbbb46113e578f81964c15a8af1002"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99cbbb46113e578f81964c15a8af1002">◆ </a></span>getFieldFilename()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::string httpsserver::HTTPBodyParser::getFieldFilename </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the filename of the current field or an empty string </p>
<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a41e573d24c77853a804c5f378c6decb9">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#a2fc0fd2ddc5c2af0799ae7c561517961">httpsserver::HTTPMultipartBodyParser</a>.</p>
</div>
</div>
<a id="a3cfd999240dacfea2c4f98161b2553ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cfd999240dacfea2c4f98161b2553ec">◆ </a></span>getFieldMimeType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::string httpsserver::HTTPBodyParser::getFieldMimeType </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the mime type of the current field.</p>
<p>Note: This value is set by the client. It can be altered maliciously. Do NOT rely on it for anything that affects the security of your device or other clients connected to it!</p>
<p>Not every BodyParser might provide this value, usually it's set to something like text/plain then </p>
<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a1b7edb73897a73e8ccafa0096852ce05">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#adc5c75da33b428354a571c4bd86842e1">httpsserver::HTTPMultipartBodyParser</a>.</p>
</div>
</div>
<a id="a7da91747462ac94a57e5d690c6c4793c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7da91747462ac94a57e5d690c6c4793c">◆ </a></span>getFieldName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual std::string httpsserver::HTTPBodyParser::getFieldName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the name of the current field </p>
<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#aaded9841fba14ad5757bc392fc1cec0f">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#ac179aa69d6c32243846a42a4c04f8c1f">httpsserver::HTTPMultipartBodyParser</a>.</p>
</div>
</div>
<a id="a47c2b28f720966b386ed00234940d421"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47c2b28f720966b386ed00234940d421">◆ </a></span>nextField()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool httpsserver::HTTPBodyParser::nextField </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Proceeds to the next field of the body</p>
<p>If a field has not been read completely, the remaining content is discarded.</p>
<p>Returns true iff proceeding to the next field succeeded (ie there was a next field) </p>
<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a8de6cf2c67585ebb5c8e5b4129f4b795">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#afd127048316aafa15fdc5d084f422346">httpsserver::HTTPMultipartBodyParser</a>.</p>
</div>
</div>
<a id="a968d4dc0644929a491d1ca1fcc8d48de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a968d4dc0644929a491d1ca1fcc8d48de">◆ </a></span>read()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual size_t httpsserver::HTTPBodyParser::read </td>
<td>(</td>
<td class="paramtype">byte * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>bufferSize</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads a maximum of bufferSize bytes into buffer and returns the actual amount of bytes that have been read </p>
<p>Implemented in <a class="el" href="classhttpsserver_1_1HTTPURLEncodedBodyParser.html#a2cf57c6d67f3db25922f95fa455ca5a6">httpsserver::HTTPURLEncodedBodyParser</a>, and <a class="el" href="classhttpsserver_1_1HTTPMultipartBodyParser.html#a8157a5f0e17ff4f09062fc8ce50e66d2">httpsserver::HTTPMultipartBodyParser</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a538423cc74c807d939365b68ac7f4857"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a538423cc74c807d939365b68ac7f4857">◆ </a></span>_request</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classhttpsserver_1_1HTTPRequest.html">HTTPRequest</a>* httpsserver::HTTPBodyParser::_request</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The underlying request </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/frank/Projekte/esp32/https_server/esp32_https_server/src/<a class="el" href="HTTPBodyParser_8hpp_source.html">HTTPBodyParser.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacehttpsserver.html">httpsserver</a></li><li class="navelem"><a class="el" href="classhttpsserver_1_1HTTPBodyParser.html">HTTPBodyParser</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>