aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-28 21:55:56 +0200
committerChristian Grothoff <christian@grothoff.org>2020-06-28 21:55:56 +0200
commita110ae6276660bee3caab30e9ff3f12f85cf3241 (patch)
treecc959ef6b757b336978802f18b4cf420563a4a48
parent0d771f770e6c444cfee7f4f588620e9c8b934d97 (diff)
downloadlibmicrohttpd-a110ae6276660bee3caab30e9ff3f12f85cf3241.tar.gz
libmicrohttpd-a110ae6276660bee3caab30e9ff3f12f85cf3241.zip
fix buffer overflow and add testv0.9.71
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac6
-rw-r--r--po/libmicrohttpd.pot432
-rw-r--r--src/microhttpd/postprocessor.c18
-rw-r--r--src/microhttpd/test_postprocessor.c66
5 files changed, 305 insertions, 221 deletions
diff --git a/ChangeLog b/ChangeLog
index 693abad3..16e837b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
1Sun 28 Jun 2020 09:36:01 PM CEST
2 Fix buffer overflow issue in URL parser.
3 Releasing libmicrohttpd 0.9.71. -CG
4
1Tue 16 Jun 2020 08:44:22 PM CEST 5Tue 16 Jun 2020 08:44:22 PM CEST
2 Add logic to try again if GNUtls uncork() fails. -CG 6 Add logic to try again if GNUtls uncork() fails. -CG
3 7
diff --git a/configure.ac b/configure.ac
index ae85dc0c..dc9e560f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,15 +22,15 @@
22# 22#
23AC_PREREQ([2.64]) 23AC_PREREQ([2.64])
24LT_PREREQ([2.4.0]) 24LT_PREREQ([2.4.0])
25AC_INIT([GNU Libmicrohttpd],[0.9.70],[libmicrohttpd@gnu.org]) 25AC_INIT([GNU Libmicrohttpd],[0.9.71],[libmicrohttpd@gnu.org])
26AC_CONFIG_AUX_DIR([build-aux]) 26AC_CONFIG_AUX_DIR([build-aux])
27AM_INIT_AUTOMAKE([silent-rules] [subdir-objects]) 27AM_INIT_AUTOMAKE([silent-rules] [subdir-objects])
28AC_CONFIG_HEADERS([MHD_config.h]) 28AC_CONFIG_HEADERS([MHD_config.h])
29AC_CONFIG_MACRO_DIR([m4]) 29AC_CONFIG_MACRO_DIR([m4])
30 30
31LIB_VERSION_CURRENT=67 31LIB_VERSION_CURRENT=68
32LIB_VERSION_REVISION=0 32LIB_VERSION_REVISION=0
33LIB_VERSION_AGE=55 33LIB_VERSION_AGE=56
34AC_SUBST(LIB_VERSION_CURRENT) 34AC_SUBST(LIB_VERSION_CURRENT)
35AC_SUBST(LIB_VERSION_REVISION) 35AC_SUBST(LIB_VERSION_REVISION)
36AC_SUBST(LIB_VERSION_AGE) 36AC_SUBST(LIB_VERSION_AGE)
diff --git a/po/libmicrohttpd.pot b/po/libmicrohttpd.pot
index e36cd81e..c0cc9f2b 100644
--- a/po/libmicrohttpd.pot
+++ b/po/libmicrohttpd.pot
@@ -6,9 +6,9 @@
6#, fuzzy 6#, fuzzy
7msgid "" 7msgid ""
8msgstr "" 8msgstr ""
9"Project-Id-Version: GNU libmicrohttpd 0.9.70\n" 9"Project-Id-Version: GNU libmicrohttpd 0.9.71\n"
10"Report-Msgid-Bugs-To: libmicrohttpd@gnu.org\n" 10"Report-Msgid-Bugs-To: libmicrohttpd@gnu.org\n"
11"POT-Creation-Date: 2020-02-08 21:57+0100\n" 11"POT-Creation-Date: 2020-06-28 21:53+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n" 14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,8 +17,8 @@ msgstr ""
17"Content-Type: text/plain; charset=CHARSET\n" 17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n" 18"Content-Transfer-Encoding: 8bit\n"
19 19
20#: src/microhttpd/connection_https.c:175 20#: src/microhttpd/connection_https.c:129
21msgid "Error: received handshake message out of context\n" 21msgid "Error: received handshake message out of context.\n"
22msgstr "" 22msgstr ""
23 23
24#: src/microhttpd/mhd_locks.h:123 24#: src/microhttpd/mhd_locks.h:123
@@ -44,7 +44,7 @@ msgid ""
44msgstr "" 44msgstr ""
45 45
46#: src/microhttpd/digestauth.c:807 46#: src/microhttpd/digestauth.c:807
47msgid "Failed to allocate memory for copy of URI arguments\n" 47msgid "Failed to allocate memory for copy of URI arguments.\n"
48msgstr "" 48msgstr ""
49 49
50#: src/microhttpd/digestauth.c:949 50#: src/microhttpd/digestauth.c:949
@@ -60,7 +60,7 @@ msgid "Authentication failed, invalid nc format.\n"
60msgstr "" 60msgstr ""
61 61
62#: src/microhttpd/digestauth.c:1044 62#: src/microhttpd/digestauth.c:1044
63msgid "Failed to allocate memory for auth header processing\n" 63msgid "Failed to allocate memory for auth header processing.\n"
64msgstr "" 64msgstr ""
65 65
66#: src/microhttpd/digestauth.c:1104 66#: src/microhttpd/digestauth.c:1104
@@ -72,7 +72,7 @@ msgid "Authentication failed, arguments do not match.\n"
72msgstr "" 72msgstr ""
73 73
74#: src/microhttpd/digestauth.c:1281 74#: src/microhttpd/digestauth.c:1281
75msgid "digest size mismatch" 75msgid "Digest size mismatch.\n"
76msgstr "" 76msgstr ""
77 77
78#: src/microhttpd/digestauth.c:1374 78#: src/microhttpd/digestauth.c:1374
@@ -80,11 +80,11 @@ msgid "Could not register nonce (is the nonce array size zero?).\n"
80msgstr "" 80msgstr ""
81 81
82#: src/microhttpd/digestauth.c:1399 82#: src/microhttpd/digestauth.c:1399
83msgid "Failed to allocate memory for auth response header\n" 83msgid "Failed to allocate memory for auth response header.\n"
84msgstr "" 84msgstr ""
85 85
86#: src/microhttpd/digestauth.c:1441 86#: src/microhttpd/digestauth.c:1441
87msgid "Failed to add Digest auth header\n" 87msgid "Failed to add Digest auth header.\n"
88msgstr "" 88msgstr ""
89 89
90#: src/microhttpd/daemon.c:140 90#: src/microhttpd/daemon.c:140
@@ -93,21 +93,21 @@ msgid "Fatal error in GNU libmicrohttpd %s:%u: %s\n"
93msgstr "" 93msgstr ""
94 94
95#: src/microhttpd/daemon.c:451 95#: src/microhttpd/daemon.c:451
96msgid "Failed to add IP connection count node\n" 96msgid "Failed to add IP connection count node.\n"
97msgstr "" 97msgstr ""
98 98
99#: src/microhttpd/daemon.c:509 99#: src/microhttpd/daemon.c:509
100msgid "Failed to find previously-added IP address\n" 100msgid "Failed to find previously-added IP address.\n"
101msgstr "" 101msgstr ""
102 102
103#: src/microhttpd/daemon.c:515 103#: src/microhttpd/daemon.c:515
104msgid "Previously-added IP address had counter of zero\n" 104msgid "Previously-added IP address had counter of zero.\n"
105msgstr "" 105msgstr ""
106 106
107#: src/microhttpd/daemon.c:625 107#: src/microhttpd/daemon.c:625
108msgid "" 108msgid ""
109"Failed to setup x509 certificate/key: pre 3.X.X version of GnuTLS does not " 109"Failed to setup x509 certificate/key: pre 3.X.X version of GnuTLS does not "
110"support setting key password" 110"support setting key password.\n"
111msgstr "" 111msgstr ""
112 112
113#: src/microhttpd/daemon.c:684 113#: src/microhttpd/daemon.c:684
@@ -126,7 +126,7 @@ msgid ""
126"unsupported.\n" 126"unsupported.\n"
127msgstr "" 127msgstr ""
128 128
129#: src/microhttpd/daemon.c:1356 src/microhttpd/daemon.c:6729 129#: src/microhttpd/daemon.c:1356 src/microhttpd/daemon.c:6725
130msgid "" 130msgid ""
131"Initiated daemon shutdown while \"upgraded\" connection was not closed.\n" 131"Initiated daemon shutdown while \"upgraded\" connection was not closed.\n"
132msgstr "" 132msgstr ""
@@ -140,7 +140,7 @@ msgid "Failed to forward to remote client "
140msgstr "" 140msgstr ""
141 141
142#: src/microhttpd/daemon.c:1730 142#: src/microhttpd/daemon.c:1730
143msgid "Error preparing select\n" 143msgid "Error preparing select.\n"
144msgstr "" 144msgstr ""
145 145
146#: src/microhttpd/daemon.c:1764 src/microhttpd/daemon.c:1918 146#: src/microhttpd/daemon.c:1764 src/microhttpd/daemon.c:1918
@@ -156,16 +156,16 @@ msgid "Error during poll: `%s'\n"
156msgstr "" 156msgstr ""
157 157
158#: src/microhttpd/daemon.c:1902 src/microhttpd/daemon.c:2044 158#: src/microhttpd/daemon.c:1902 src/microhttpd/daemon.c:2044
159msgid "Failed to add FD to fd_set\n" 159msgid "Failed to add FD to fd_set.\n"
160msgstr "" 160msgstr ""
161 161
162#: src/microhttpd/daemon.c:2184 162#: src/microhttpd/daemon.c:2184
163msgid "Processing thread terminating. Closing connection\n" 163msgid "Processing thread terminating. Closing connection.\n"
164msgstr "" 164msgstr ""
165 165
166#: src/microhttpd/daemon.c:2214 166#: src/microhttpd/daemon.c:2214
167msgid "" 167msgid ""
168"Failed to signal thread termination via inter-thread communication channel." 168"Failed to signal thread termination via inter-thread communication channel.\n"
169msgstr "" 169msgstr ""
170 170
171#: src/microhttpd/daemon.c:2289 171#: src/microhttpd/daemon.c:2289
@@ -177,14 +177,14 @@ msgid "PSK not supported by this server.\n"
177msgstr "" 177msgstr ""
178 178
179#: src/microhttpd/daemon.c:2314 179#: src/microhttpd/daemon.c:2314
180msgid "PSK authentication failed: gnutls_malloc failed to allocate memory\n" 180msgid "PSK authentication failed: gnutls_malloc failed to allocate memory.\n"
181msgstr "" 181msgstr ""
182 182
183#: src/microhttpd/daemon.c:2323 183#: src/microhttpd/daemon.c:2323
184msgid "PSK authentication failed: PSK too long\n" 184msgid "PSK authentication failed: PSK too long.\n"
185msgstr "" 185msgstr ""
186 186
187#: src/microhttpd/daemon.c:2421 src/microhttpd/daemon.c:6366 187#: src/microhttpd/daemon.c:2421 src/microhttpd/daemon.c:6367
188#, c-format 188#, c-format
189msgid "Socket descriptor larger than FD_SETSIZE: %d > %d\n" 189msgid "Socket descriptor larger than FD_SETSIZE: %d > %d\n"
190msgstr "" 190msgstr ""
@@ -194,12 +194,12 @@ msgstr ""
194msgid "Failed to set SO_NOSIGPIPE on accepted socket: %s\n" 194msgid "Failed to set SO_NOSIGPIPE on accepted socket: %s\n"
195msgstr "" 195msgstr ""
196 196
197#: src/microhttpd/daemon.c:2454 src/microhttpd/daemon.c:3314 197#: src/microhttpd/daemon.c:2454
198#, c-format 198#, c-format
199msgid "Accepted connection on socket %d\n" 199msgid "Accepted connection on socket %d.\n"
200msgstr "" 200msgstr ""
201 201
202#: src/microhttpd/daemon.c:2467 src/microhttpd/daemon.c:2664 202#: src/microhttpd/daemon.c:2467 src/microhttpd/daemon.c:2665
203msgid "Server reached connection limit. Closing inbound connection.\n" 203msgid "Server reached connection limit. Closing inbound connection.\n"
204msgstr "" 204msgstr ""
205 205
@@ -207,559 +207,563 @@ msgstr ""
207msgid "Connection rejected by application. Closing connection.\n" 207msgid "Connection rejected by application. Closing connection.\n"
208msgstr "" 208msgstr ""
209 209
210#: src/microhttpd/daemon.c:2518 src/microhttpd/daemon.c:2538 210#: src/microhttpd/daemon.c:2519 src/microhttpd/daemon.c:2539
211#: src/microhttpd/daemon.c:3902 211#: src/microhttpd/daemon.c:3903
212#, c-format 212#, c-format
213msgid "Error allocating memory: %s\n" 213msgid "Error allocating memory: %s\n"
214msgstr "" 214msgstr ""
215 215
216#: src/microhttpd/daemon.c:2616 216#: src/microhttpd/daemon.c:2617
217#, c-format 217#, c-format
218msgid "Failed to setup TLS credentials: unknown credential type %d\n" 218msgid "Failed to setup TLS credentials: unknown credential type %d.\n"
219msgstr "" 219msgstr ""
220 220
221#: src/microhttpd/daemon.c:2625 221#: src/microhttpd/daemon.c:2626
222msgid "Unknown credential type" 222msgid "Unknown credential type.\n"
223msgstr "" 223msgstr ""
224 224
225#: src/microhttpd/daemon.c:2728 src/microhttpd/daemon.c:4398 225#: src/microhttpd/daemon.c:2729 src/microhttpd/daemon.c:4399
226#: src/microhttpd/daemon.c:4431 src/microhttpd/daemon.c:5645 226#: src/microhttpd/daemon.c:4432 src/microhttpd/daemon.c:5646
227#: src/microhttpd/daemon.c:5662 src/microhttpd/connection.c:3792 227#: src/microhttpd/daemon.c:5663 src/microhttpd/connection.c:3738
228#: src/microhttpd/response.c:1053 src/microhttpd/response.c:1079 228#: src/microhttpd/response.c:1053 src/microhttpd/response.c:1079
229#, c-format 229#, c-format
230msgid "Call to epoll_ctl failed: %s\n" 230msgid "Call to epoll_ctl failed: %s\n"
231msgstr "" 231msgstr ""
232 232
233#: src/microhttpd/daemon.c:2755 233#: src/microhttpd/daemon.c:2756
234msgid "Failed to signal new connection via inter-thread communication channel." 234msgid ""
235"Failed to signal new connection via inter-thread communication channel.\n"
235msgstr "" 236msgstr ""
236 237
237#: src/microhttpd/daemon.c:2860 src/microhttpd/daemon.c:3397 238#: src/microhttpd/daemon.c:2861 src/microhttpd/daemon.c:3398
238#: src/microhttpd/daemon.c:6616 src/microhttpd/connection.c:801 239#: src/microhttpd/daemon.c:6612 src/microhttpd/connection.c:747
239#: src/microhttpd/connection.c:820 240#: src/microhttpd/connection.c:766
240msgid "Failed to remove FD from epoll set\n" 241msgid "Failed to remove FD from epoll set.\n"
241msgstr "" 242msgstr ""
242 243
243#: src/microhttpd/daemon.c:2910 244#: src/microhttpd/daemon.c:2911
244msgid "Cannot suspend connections without enabling MHD_ALLOW_SUSPEND_RESUME!\n" 245msgid "Cannot suspend connections without enabling MHD_ALLOW_SUSPEND_RESUME!\n"
245msgstr "" 246msgstr ""
246 247
247#: src/microhttpd/daemon.c:2917 248#: src/microhttpd/daemon.c:2918
248msgid "Error: connection scheduled for \"upgrade\" cannot be suspended" 249msgid "Error: connection scheduled for \"upgrade\" cannot be suspended.\n"
249msgstr "" 250msgstr ""
250 251
251#: src/microhttpd/daemon.c:2941 252#: src/microhttpd/daemon.c:2942
252msgid "Cannot resume connections without enabling MHD_ALLOW_SUSPEND_RESUME!\n" 253msgid "Cannot resume connections without enabling MHD_ALLOW_SUSPEND_RESUME!\n"
253msgstr "" 254msgstr ""
254 255
255#: src/microhttpd/daemon.c:2956 256#: src/microhttpd/daemon.c:2957
256msgid "Failed to signal resume via inter-thread communication channel." 257msgid "Failed to signal resume via inter-thread communication channel.\n"
257msgstr "" 258msgstr ""
258 259
259#: src/microhttpd/daemon.c:3091 260#: src/microhttpd/daemon.c:3092
260msgid "" 261msgid ""
261"Failed to signal resume of connection via inter-thread communication channel." 262"Failed to signal resume of connection via inter-thread communication "
263"channel.\n"
262msgstr "" 264msgstr ""
263 265
264#: src/microhttpd/daemon.c:3139 266#: src/microhttpd/daemon.c:3140
265#, c-format 267#, c-format
266msgid "Failed to set nonblocking mode on new client socket: %s\n" 268msgid "Failed to set nonblocking mode on new client socket: %s\n"
267msgstr "" 269msgstr ""
268 270
269#: src/microhttpd/daemon.c:3152 271#: src/microhttpd/daemon.c:3153
270msgid "Failed to set noninheritable mode on new client socket.\n" 272msgid "Failed to set noninheritable mode on new client socket.\n"
271msgstr "" 273msgstr ""
272 274
273#: src/microhttpd/daemon.c:3161 275#: src/microhttpd/daemon.c:3162
274msgid "Failed to reset buffering mode on new client socket.\n" 276msgid "Failed to reset buffering mode on new client socket.\n"
275msgstr "" 277msgstr ""
276 278
277#: src/microhttpd/daemon.c:3234 279#: src/microhttpd/daemon.c:3235
278#, c-format 280#, c-format
279msgid "Error accepting connection: %s\n" 281msgid "Error accepting connection: %s\n"
280msgstr "" 282msgstr ""
281 283
282#: src/microhttpd/daemon.c:3252 284#: src/microhttpd/daemon.c:3253
283msgid "" 285msgid ""
284"Hit process or system resource limit at FIRST connection. This is really bad " 286"Hit process or system resource limit at FIRST connection. This is really bad "
285"as there is no sane way to proceed. Will try busy waiting for system " 287"as there is no sane way to proceed. Will try busy waiting for system "
286"resources to become magically available.\n" 288"resources to become magically available.\n"
287msgstr "" 289msgstr ""
288 290
289#: src/microhttpd/daemon.c:3267 291#: src/microhttpd/daemon.c:3268
290#, c-format 292#, c-format
291msgid "" 293msgid ""
292"Hit process or system resource limit at %u connections, temporarily " 294"Hit process or system resource limit at %u connections, temporarily "
293"suspending accept(). Consider setting a lower MHD_OPTION_CONNECTION_LIMIT.\n" 295"suspending accept(). Consider setting a lower MHD_OPTION_CONNECTION_LIMIT.\n"
294msgstr "" 296msgstr ""
295 297
296#: src/microhttpd/daemon.c:3283 298#: src/microhttpd/daemon.c:3284
297#, c-format 299#, c-format
298msgid "Failed to disable TCP Nagle on socket: %s\n" 300msgid "Failed to disable TCP Nagle on socket: %s\n"
299msgstr "" 301msgstr ""
300 302
301#: src/microhttpd/daemon.c:3294 303#: src/microhttpd/daemon.c:3295
302#, c-format 304#, c-format
303msgid "Failed to set nonblocking mode on incoming connection socket: %s\n" 305msgid "Failed to set nonblocking mode on incoming connection socket: %s\n"
304msgstr "" 306msgstr ""
305 307
306#: src/microhttpd/daemon.c:3307 308#: src/microhttpd/daemon.c:3308
307msgid "Failed to set noninheritable mode on incoming connection socket.\n" 309msgid "Failed to set noninheritable mode on incoming connection socket.\n"
308msgstr "" 310msgstr ""
309 311
310#: src/microhttpd/daemon.c:3355 src/microhttpd/daemon.c:6773 312#: src/microhttpd/daemon.c:3315
311#: src/microhttpd/daemon.c:6805 src/microhttpd/daemon.c:6907 313#, c-format
312msgid "Failed to join a thread\n" 314msgid "Accepted connection on socket %d\n"
315msgstr ""
316
317#: src/microhttpd/daemon.c:3356 src/microhttpd/daemon.c:6769
318#: src/microhttpd/daemon.c:6801 src/microhttpd/daemon.c:6903
319msgid "Failed to join a thread.\n"
313msgstr "" 320msgstr ""
314 321
315#: src/microhttpd/daemon.c:3458 322#: src/microhttpd/daemon.c:3459
316msgid "Illegal call to MHD_get_timeout\n" 323msgid "Illegal call to MHD_get_timeout.\n"
317msgstr "" 324msgstr ""
318 325
319#: src/microhttpd/daemon.c:3655 326#: src/microhttpd/daemon.c:3656
320msgid "" 327msgid ""
321"MHD_run_from_select() called with except_fd_set set to NULL. Such behavior " 328"MHD_run_from_select() called with except_fd_set set to NULL. Such behavior "
322"is deprecated.\n" 329"is deprecated.\n"
323msgstr "" 330msgstr ""
324 331
325#: src/microhttpd/daemon.c:3735 332#: src/microhttpd/daemon.c:3736
326msgid "Could not obtain daemon fdsets" 333msgid "Could not obtain daemon fdsets.\n"
327msgstr "" 334msgstr ""
328 335
329#: src/microhttpd/daemon.c:3752 336#: src/microhttpd/daemon.c:3753
330msgid "Could not add listen socket to fdset" 337msgid "Could not add listen socket to fdset.\n"
331msgstr "" 338msgstr ""
332 339
333#: src/microhttpd/daemon.c:3781 340#: src/microhttpd/daemon.c:3782
334msgid "Could not add control inter-thread communication channel FD to fdset" 341msgid "Could not add control inter-thread communication channel FD to fdset.\n"
335msgstr "" 342msgstr ""
336 343
337#: src/microhttpd/daemon.c:3839 344#: src/microhttpd/daemon.c:3840
338#, c-format 345#, c-format
339msgid "select failed: %s\n" 346msgid "select failed: %s\n"
340msgstr "" 347msgstr ""
341 348
342#: src/microhttpd/daemon.c:3984 src/microhttpd/daemon.c:4132 349#: src/microhttpd/daemon.c:3985 src/microhttpd/daemon.c:4133
343#, c-format 350#, c-format
344msgid "poll failed: %s\n" 351msgid "poll failed: %s\n"
345msgstr "" 352msgstr ""
346 353
347#: src/microhttpd/daemon.c:4265 src/microhttpd/daemon.c:4498 354#: src/microhttpd/daemon.c:4266 src/microhttpd/daemon.c:4499
348#, c-format 355#, c-format
349msgid "Call to epoll_wait failed: %s\n" 356msgid "Call to epoll_wait failed: %s\n"
350msgstr "" 357msgstr ""
351 358
352#: src/microhttpd/daemon.c:4450 src/microhttpd/daemon.c:4911 359#: src/microhttpd/daemon.c:4451 src/microhttpd/daemon.c:4912
353msgid "Failed to remove listen FD from epoll set\n" 360msgid "Failed to remove listen FD from epoll set.\n"
354msgstr "" 361msgstr ""
355 362
356#: src/microhttpd/daemon.c:4920 363#: src/microhttpd/daemon.c:4921
357msgid "Failed to signal quiesce via inter-thread communication channel" 364msgid "Failed to signal quiesce via inter-thread communication channel.\n"
358msgstr "" 365msgstr ""
359 366
360#: src/microhttpd/daemon.c:4943 367#: src/microhttpd/daemon.c:4944
361msgid "failed to signal quiesce via inter-thread communication channel" 368msgid "failed to signal quiesce via inter-thread communication channel.\n"
362msgstr "" 369msgstr ""
363 370
364#: src/microhttpd/daemon.c:5057 371#: src/microhttpd/daemon.c:5058
365msgid "Warning: Too large timeout value, ignored.\n" 372msgid "Warning: Too large timeout value, ignored.\n"
366msgstr "" 373msgstr ""
367 374
368#: src/microhttpd/daemon.c:5102 375#: src/microhttpd/daemon.c:5103
369msgid "" 376msgid ""
370"Warning: Zero size, specified for thread pool size, is ignored. Thread pool " 377"Warning: Zero size, specified for thread pool size, is ignored. Thread pool "
371"is not used.\n" 378"is not used.\n"
372msgstr "" 379msgstr ""
373 380
374#: src/microhttpd/daemon.c:5111 381#: src/microhttpd/daemon.c:5112
375msgid "" 382msgid ""
376"Warning: \"1\", specified for thread pool size, is ignored. Thread pool is " 383"Warning: \"1\", specified for thread pool size, is ignored. Thread pool is "
377"not used.\n" 384"not used.\n"
378msgstr "" 385msgstr ""
379 386
380#: src/microhttpd/daemon.c:5124 387#: src/microhttpd/daemon.c:5125
381#, c-format 388#, c-format
382msgid "Specified thread pool size (%u) too big\n" 389msgid "Specified thread pool size (%u) too big.\n"
383msgstr "" 390msgstr ""
384 391
385#: src/microhttpd/daemon.c:5135 392#: src/microhttpd/daemon.c:5136
386msgid "" 393msgid ""
387"MHD_OPTION_THREAD_POOL_SIZE option is specified but " 394"MHD_OPTION_THREAD_POOL_SIZE option is specified but "
388"MHD_USE_INTERNAL_POLLING_THREAD flag is not specified.\n" 395"MHD_USE_INTERNAL_POLLING_THREAD flag is not specified.\n"
389msgstr "" 396msgstr ""
390 397
391#: src/microhttpd/daemon.c:5144 398#: src/microhttpd/daemon.c:5145
392msgid "" 399msgid ""
393"Both MHD_OPTION_THREAD_POOL_SIZE option and MHD_USE_THREAD_PER_CONNECTION " 400"Both MHD_OPTION_THREAD_POOL_SIZE option and MHD_USE_THREAD_PER_CONNECTION "
394"flag are specified.\n" 401"flag are specified.\n"
395msgstr "" 402msgstr ""
396 403
397#: src/microhttpd/daemon.c:5162 src/microhttpd/daemon.c:5175 404#: src/microhttpd/daemon.c:5163 src/microhttpd/daemon.c:5176
398#: src/microhttpd/daemon.c:5188 src/microhttpd/daemon.c:5201 405#: src/microhttpd/daemon.c:5189 src/microhttpd/daemon.c:5202
399#: src/microhttpd/daemon.c:5253 src/microhttpd/daemon.c:5282 406#: src/microhttpd/daemon.c:5254 src/microhttpd/daemon.c:5283
400#: src/microhttpd/daemon.c:5303 src/microhttpd/daemon.c:5325 407#: src/microhttpd/daemon.c:5304 src/microhttpd/daemon.c:5326
401#, c-format 408#, c-format
402msgid "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set\n" 409msgid "MHD HTTPS option %d passed to MHD but MHD_USE_TLS not set.\n"
403msgstr "" 410msgstr ""
404 411
405#: src/microhttpd/daemon.c:5221 412#: src/microhttpd/daemon.c:5222
406msgid "Error initializing DH parameters\n" 413msgid "Error initializing DH parameters.\n"
407msgstr "" 414msgstr ""
408 415
409#: src/microhttpd/daemon.c:5231 416#: src/microhttpd/daemon.c:5232
410msgid "Diffie-Hellman parameters string too long\n" 417msgid "Diffie-Hellman parameters string too long.\n"
411msgstr "" 418msgstr ""
412 419
413#: src/microhttpd/daemon.c:5242 420#: src/microhttpd/daemon.c:5243
414msgid "Bad Diffie-Hellman parameters format\n" 421msgid "Bad Diffie-Hellman parameters format.\n"
415msgstr "" 422msgstr ""
416 423
417#: src/microhttpd/daemon.c:5270 424#: src/microhttpd/daemon.c:5271
418#, c-format 425#, c-format
419msgid "Setting priorities to `%s' failed: %s\n" 426msgid "Setting priorities to `%s' failed: %s\n"
420msgstr "" 427msgstr ""
421 428
422#: src/microhttpd/daemon.c:5291 429#: src/microhttpd/daemon.c:5292
423msgid "" 430msgid ""
424"MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0\n" 431"MHD_OPTION_HTTPS_CERT_CALLBACK requires building MHD with GnuTLS >= 3.0.\n"
425msgstr "" 432msgstr ""
426 433
427#: src/microhttpd/daemon.c:5313 434#: src/microhttpd/daemon.c:5314
428msgid "" 435msgid ""
429"MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3\n" 436"MHD_OPTION_HTTPS_CERT_CALLBACK2 requires building MHD with GnuTLS >= 3.6.3.\n"
430msgstr "" 437msgstr ""
431 438
432#: src/microhttpd/daemon.c:5348 439#: src/microhttpd/daemon.c:5349
433msgid "" 440msgid ""
434"MHD_OPTION_LISTEN_SOCKET specified for daemon with MHD_USE_NO_LISTEN_SOCKET " 441"MHD_OPTION_LISTEN_SOCKET specified for daemon with MHD_USE_NO_LISTEN_SOCKET "
435"flag set.\n" 442"flag set.\n"
436msgstr "" 443msgstr ""
437 444
438#: src/microhttpd/daemon.c:5384 445#: src/microhttpd/daemon.c:5385
439msgid "TCP fastopen is not supported on this platform\n" 446msgid "TCP fastopen is not supported on this platform.\n"
440msgstr "" 447msgstr ""
441 448
442#: src/microhttpd/daemon.c:5403 449#: src/microhttpd/daemon.c:5404
443msgid "" 450msgid ""
444"Flag MHD_USE_PEDANTIC_CHECKS is ignored because another behavior is " 451"Flag MHD_USE_PEDANTIC_CHECKS is ignored because another behavior is "
445"specified by MHD_OPTION_STRICT_CLIENT.\n" 452"specified by MHD_OPTION_STRICT_CLIENT.\n"
446msgstr "" 453msgstr ""
447 454
448#: src/microhttpd/daemon.c:5538 455#: src/microhttpd/daemon.c:5539
449#, c-format 456#, c-format
450msgid "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3\n" 457msgid "MHD HTTPS option %d passed to MHD compiled without GNUtls >= 3.\n"
451msgstr "" 458msgstr ""
452 459
453#: src/microhttpd/daemon.c:5552 460#: src/microhttpd/daemon.c:5553
454#, c-format 461#, c-format
455msgid "MHD HTTPS option %d passed to MHD compiled without HTTPS support\n" 462msgid "MHD HTTPS option %d passed to MHD compiled without HTTPS support.\n"
456msgstr "" 463msgstr ""
457 464
458#: src/microhttpd/daemon.c:5559 465#: src/microhttpd/daemon.c:5560
459#, c-format 466#, c-format
460msgid "Invalid option %d! (Did you terminate the list with MHD_OPTION_END?)\n" 467msgid "Invalid option %d! (Did you terminate the list with MHD_OPTION_END?).\n"
461msgstr "" 468msgstr ""
462 469
463#: src/microhttpd/daemon.c:5589 470#: src/microhttpd/daemon.c:5590
464#, c-format 471#, c-format
465msgid "Call to epoll_create1 failed: %s\n" 472msgid "Call to epoll_create1 failed: %s\n"
466msgstr "" 473msgstr ""
467 474
468#: src/microhttpd/daemon.c:5599 475#: src/microhttpd/daemon.c:5600
469msgid "Failed to set noninheritable mode on epoll FD.\n" 476msgid "Failed to set noninheritable mode on epoll FD.\n"
470msgstr "" 477msgstr ""
471 478
472#: src/microhttpd/daemon.c:5851 479#: src/microhttpd/daemon.c:5852
473msgid "" 480msgid ""
474"Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with " 481"Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with "
475"MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD was " 482"MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD was "
476"added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.\n" 483"added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly.\n"
477msgstr "" 484msgstr ""
478 485
479#: src/microhttpd/daemon.c:5899 486#: src/microhttpd/daemon.c:5900
480msgid "Using debug build of libmicrohttpd.\n" 487msgid "Using debug build of libmicrohttpd.\n"
481msgstr "" 488msgstr ""
482 489
483#: src/microhttpd/daemon.c:5913 490#: src/microhttpd/daemon.c:5914
484#, c-format 491#, c-format
485msgid "Failed to create inter-thread communication channel: %s\n" 492msgid "Failed to create inter-thread communication channel: %s\n"
486msgstr "" 493msgstr ""
487 494
488#: src/microhttpd/daemon.c:5930 495#: src/microhttpd/daemon.c:5931
489msgid "" 496msgid ""
490"file descriptor for inter-thread communication channel exceeds maximum " 497"file descriptor for inter-thread communication channel exceeds maximum "
491"value\n" 498"value.\n"
492msgstr "" 499msgstr ""
493 500
494#: src/microhttpd/daemon.c:5950 501#: src/microhttpd/daemon.c:5951
495msgid "Specified value for NC_SIZE too large\n" 502msgid "Specified value for NC_SIZE too large.\n"
496msgstr "" 503msgstr ""
497 504
498#: src/microhttpd/daemon.c:5964 505#: src/microhttpd/daemon.c:5965
499#, c-format 506#, c-format
500msgid "Failed to allocate memory for nonce-nc map: %s\n" 507msgid "Failed to allocate memory for nonce-nc map: %s\n"
501msgstr "" 508msgstr ""
502 509
503#: src/microhttpd/daemon.c:5981 510#: src/microhttpd/daemon.c:5982
504msgid "MHD failed to initialize nonce-nc mutex\n" 511msgid "MHD failed to initialize nonce-nc mutex.\n"
505msgstr "" 512msgstr ""
506 513
507#: src/microhttpd/daemon.c:6002 514#: src/microhttpd/daemon.c:6003
508msgid "MHD thread pooling only works with MHD_USE_INTERNAL_POLLING_THREAD\n" 515msgid "MHD thread polling only works with MHD_USE_INTERNAL_POLLING_THREAD.\n"
509msgstr "" 516msgstr ""
510 517
511#: src/microhttpd/daemon.c:6026 518#: src/microhttpd/daemon.c:6027
512#, c-format 519#, c-format
513msgid "Failed to create socket for listening: %s\n" 520msgid "Failed to create socket for listening: %s\n"
514msgstr "" 521msgstr ""
515 522
516#: src/microhttpd/daemon.c:6047 src/microhttpd/daemon.c:6066 523#: src/microhttpd/daemon.c:6048 src/microhttpd/daemon.c:6067
517#: src/microhttpd/daemon.c:6089 src/microhttpd/daemon.c:6127 524#: src/microhttpd/daemon.c:6090 src/microhttpd/daemon.c:6128
518#: src/microhttpd/daemon.c:6205 src/microhttpd/daemon.c:6236 525#: src/microhttpd/daemon.c:6206 src/microhttpd/daemon.c:6237
519#, c-format 526#, c-format
520msgid "setsockopt failed: %s\n" 527msgid "setsockopt failed: %s\n"
521msgstr "" 528msgstr ""
522 529
523#: src/microhttpd/daemon.c:6100 530#: src/microhttpd/daemon.c:6101
524msgid "Cannot allow listening address reuse: SO_REUSEPORT not defined\n" 531msgid "Cannot allow listening address reuse: SO_REUSEPORT not defined.\n"
525msgstr "" 532msgstr ""
526 533
527#: src/microhttpd/daemon.c:6136 534#: src/microhttpd/daemon.c:6137
528msgid "" 535msgid ""
529"Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined\n" 536"Cannot disallow listening address reuse: SO_EXCLUSIVEADDRUSE not defined.\n"
530msgstr "" 537msgstr ""
531 538
532#: src/microhttpd/daemon.c:6216 539#: src/microhttpd/daemon.c:6217
533#, c-format 540#, c-format
534msgid "Failed to bind to port %u: %s\n" 541msgid "Failed to bind to port %u: %s\n"
535msgstr "" 542msgstr ""
536 543
537#: src/microhttpd/daemon.c:6247 544#: src/microhttpd/daemon.c:6248
538#, c-format 545#, c-format
539msgid "Failed to listen for connections: %s\n" 546msgid "Failed to listen for connections: %s\n"
540msgstr "" 547msgstr ""
541 548
542#: src/microhttpd/daemon.c:6278 549#: src/microhttpd/daemon.c:6279
543#, c-format 550#, c-format
544msgid "Failed to get listen port number: %s\n" 551msgid "Failed to get listen port number: %s\n"
545msgstr "" 552msgstr ""
546 553
547#: src/microhttpd/daemon.c:6289 554#: src/microhttpd/daemon.c:6290
548msgid "" 555msgid ""
549"Failed to get listen port number (`struct sockaddr_storage` too small!?)\n" 556"Failed to get listen port number (`struct sockaddr_storage` too small!?).\n"
550msgstr "" 557msgstr ""
551 558
552#: src/microhttpd/daemon.c:6330 559#: src/microhttpd/daemon.c:6331
553msgid "Unknown address family!\n" 560msgid "Unknown address family!\n"
554msgstr "" 561msgstr ""
555 562
556#: src/microhttpd/daemon.c:6343 563#: src/microhttpd/daemon.c:6344
557#, c-format 564#, c-format
558msgid "Failed to set nonblocking mode on listening socket: %s\n" 565msgid "Failed to set nonblocking mode on listening socket: %s\n"
559msgstr "" 566msgstr ""
560 567
561#: src/microhttpd/daemon.c:6386 568#: src/microhttpd/daemon.c:6387
562msgid "" 569msgid ""
563"Combining MHD_USE_THREAD_PER_CONNECTION and MHD_USE_EPOLL is not supported.\n" 570"Combining MHD_USE_THREAD_PER_CONNECTION and MHD_USE_EPOLL is not supported.\n"
564msgstr "" 571msgstr ""
565 572
566#: src/microhttpd/daemon.c:6400 src/microhttpd/daemon.c:6413 573#: src/microhttpd/daemon.c:6401 src/microhttpd/daemon.c:6411
567msgid "MHD failed to initialize IP connection limit mutex\n" 574msgid "MHD failed to initialize IP connection limit mutex.\n"
568msgstr "" 575msgstr ""
569 576
570#: src/microhttpd/daemon.c:6432 577#: src/microhttpd/daemon.c:6429
571msgid "Failed to initialize TLS support\n" 578msgid "Failed to initialize TLS support.\n"
572msgstr "" 579msgstr ""
573 580
574#: src/microhttpd/daemon.c:6460 581#: src/microhttpd/daemon.c:6456
575#, c-format 582#, c-format
576msgid "Failed to create listen thread: %s\n" 583msgid "Failed to create listen thread: %s\n"
577msgstr "" 584msgstr ""
578 585
579#: src/microhttpd/daemon.c:6509 586#: src/microhttpd/daemon.c:6505
580#, c-format 587#, c-format
581msgid "Failed to create worker inter-thread communication channel: %s\n" 588msgid "Failed to create worker inter-thread communication channel: %s\n"
582msgstr "" 589msgstr ""
583 590
584#: src/microhttpd/daemon.c:6521 591#: src/microhttpd/daemon.c:6517
585msgid "" 592msgid ""
586"File descriptor for worker inter-thread communication channel exceeds " 593"File descriptor for worker inter-thread communication channel exceeds "
587"maximum value\n" 594"maximum value.\n"
588msgstr "" 595msgstr ""
589 596
590#: src/microhttpd/daemon.c:6546 597#: src/microhttpd/daemon.c:6542
591msgid "MHD failed to initialize cleanup connection mutex\n" 598msgid "MHD failed to initialize cleanup connection mutex.\n"
592msgstr "" 599msgstr ""
593 600
594#: src/microhttpd/daemon.c:6560 601#: src/microhttpd/daemon.c:6556
595#, c-format 602#, c-format
596msgid "Failed to create pool thread: %s\n" 603msgid "Failed to create pool thread: %s\n"
597msgstr "" 604msgstr ""
598 605
599#: src/microhttpd/daemon.c:6715 src/microhttpd/daemon.c:6748 606#: src/microhttpd/daemon.c:6711 src/microhttpd/daemon.c:6744
600msgid "MHD_stop_daemon() called while we have suspended connections.\n" 607msgid "MHD_stop_daemon() called while we have suspended connections.\n"
601msgstr "" 608msgstr ""
602 609
603#: src/microhttpd/daemon.c:6758 src/microhttpd/daemon.c:6889 610#: src/microhttpd/daemon.c:6754 src/microhttpd/daemon.c:6847
604msgid "Failed to signal shutdown via inter-thread communication channel" 611#: src/microhttpd/daemon.c:6885
605msgstr "" 612msgid "Failed to signal shutdown via inter-thread communication channel.\n"
606
607#: src/microhttpd/daemon.c:6851
608msgid "Failed to signal shutdown via inter-thread communication channel."
609msgstr "" 613msgstr ""
610 614
611#: src/microhttpd/daemon.c:7327 615#: src/microhttpd/daemon.c:7323
612msgid "Failed to initialize winsock\n" 616msgid "Failed to initialize winsock.\n"
613msgstr "" 617msgstr ""
614 618
615#: src/microhttpd/daemon.c:7330 619#: src/microhttpd/daemon.c:7326
616msgid "Winsock version 2.2 is not available\n" 620msgid "Winsock version 2.2 is not available.\n"
617msgstr "" 621msgstr ""
618 622
619#: src/microhttpd/daemon.c:7338 src/microhttpd/daemon.c:7342 623#: src/microhttpd/daemon.c:7334 src/microhttpd/daemon.c:7338
620msgid "Failed to initialise multithreading in libgcrypt\n" 624msgid "Failed to initialise multithreading in libgcrypt.\n"
621msgstr "" 625msgstr ""
622 626
623#: src/microhttpd/daemon.c:7348 627#: src/microhttpd/daemon.c:7344
624msgid "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer\n" 628msgid "libgcrypt is too old. MHD was compiled for libgcrypt 1.6.0 or newer.\n"
625msgstr "" 629msgstr ""
626 630
627#: src/microhttpd/mhd_sockets.h:270 631#: src/microhttpd/mhd_sockets.h:274
628msgid "Close socket failed.\n" 632msgid "Close socket failed.\n"
629msgstr "" 633msgstr ""
630 634
631#: src/microhttpd/connection.c:928 635#: src/microhttpd/connection.c:874
632msgid "Closing connection (application reported error generating data)\n" 636msgid "Closing connection (application reported error generating data).\n"
633msgstr "" 637msgstr ""
634 638
635#: src/microhttpd/connection.c:977 639#: src/microhttpd/connection.c:923
636msgid "Closing connection (out of memory)\n" 640msgid "Closing connection (out of memory).\n"
637msgstr "" 641msgstr ""
638 642
639#: src/microhttpd/connection.c:1025 643#: src/microhttpd/connection.c:971
640msgid "Closing connection (application error generating response)\n" 644msgid "Closing connection (application error generating response).\n"
641msgstr "" 645msgstr ""
642 646
643#: src/microhttpd/connection.c:1653 647#: src/microhttpd/connection.c:1599
644#, c-format 648#, c-format
645msgid "" 649msgid ""
646"Error processing request (HTTP response code is %u (`%s')). Closing " 650"Error processing request (HTTP response code is %u (`%s')). Closing "
647"connection.\n" 651"connection.\n"
648msgstr "" 652msgstr ""
649 653
650#: src/microhttpd/connection.c:1680 src/microhttpd/connection.c:2715 654#: src/microhttpd/connection.c:1626 src/microhttpd/connection.c:2661
651msgid "Closing connection (failed to queue response)\n" 655msgid "Closing connection (failed to queue response).\n"
652msgstr "" 656msgstr ""
653 657
654#: src/microhttpd/connection.c:1691 src/microhttpd/connection.c:3523 658#: src/microhttpd/connection.c:1637 src/microhttpd/connection.c:3469
655#: src/microhttpd/connection.c:3632 659#: src/microhttpd/connection.c:3578
656msgid "Closing connection (failed to create response header)\n" 660msgid "Closing connection (failed to create response header).\n"
657msgstr "" 661msgstr ""
658 662
659#: src/microhttpd/connection.c:1737 src/microhttpd/connection.c:2875 663#: src/microhttpd/connection.c:1683 src/microhttpd/connection.c:2821
660#: src/microhttpd/connection.c:2943 src/microhttpd/connection.c:3296 664#: src/microhttpd/connection.c:2889 src/microhttpd/connection.c:3242
661#, c-format 665#, c-format
662msgid "In function %s handling connection at state: %s\n" 666msgid "In function %s handling connection at state: %s\n"
663msgstr "" 667msgstr ""
664 668
665#: src/microhttpd/connection.c:1954 669#: src/microhttpd/connection.c:1900
666msgid "Not enough memory in pool to allocate header record!\n" 670msgid "Not enough memory in pool to allocate header record!\n"
667msgstr "" 671msgstr ""
668 672
669#: src/microhttpd/connection.c:2001 673#: src/microhttpd/connection.c:1947
670msgid "Not enough memory in pool to parse cookies!\n" 674msgid "Not enough memory in pool to parse cookies!\n"
671msgstr "" 675msgstr ""
672 676
673#: src/microhttpd/connection.c:2232 src/microhttpd/connection.c:2434 677#: src/microhttpd/connection.c:2178 src/microhttpd/connection.c:2380
674msgid "Application reported internal error, closing connection.\n" 678msgid "Application reported internal error, closing connection.\n"
675msgstr "" 679msgstr ""
676 680
677#: src/microhttpd/connection.c:2299 src/microhttpd/connection.c:2378 681#: src/microhttpd/connection.c:2245 src/microhttpd/connection.c:2324
678msgid "" 682msgid ""
679"Received malformed HTTP request (bad chunked encoding). Closing connection.\n" 683"Received malformed HTTP request (bad chunked encoding). Closing connection.\n"
680msgstr "" 684msgstr ""
681 685
682#: src/microhttpd/connection.c:2442 686#: src/microhttpd/connection.c:2388
683msgid "libmicrohttpd API violation" 687msgid "libmicrohttpd API violation.\n"
684msgstr "" 688msgstr ""
685 689
686#: src/microhttpd/connection.c:2458 690#: src/microhttpd/connection.c:2404
687msgid "" 691msgid ""
688"WARNING: incomplete upload processing and connection not suspended may " 692"WARNING: incomplete upload processing and connection not suspended may "
689"result in hung connection.\n" 693"result in hung connection.\n"
690msgstr "" 694msgstr ""
691 695
692#: src/microhttpd/connection.c:2530 696#: src/microhttpd/connection.c:2476
693msgid "Received malformed line (no colon). Closing connection.\n" 697msgid "Received malformed line (no colon). Closing connection.\n"
694msgstr "" 698msgstr ""
695 699
696#: src/microhttpd/connection.c:2691 700#: src/microhttpd/connection.c:2637
697msgid "Received HTTP 1.1 request without `Host' header.\n" 701msgid "Received HTTP 1.1 request without `Host' header.\n"
698msgstr "" 702msgstr ""
699 703
700#: src/microhttpd/connection.c:2703 704#: src/microhttpd/connection.c:2649
701msgid "Closing connection (failed to create response)\n" 705msgid "Closing connection (failed to create response).\n"
702msgstr "" 706msgstr ""
703 707
704#: src/microhttpd/connection.c:2853 708#: src/microhttpd/connection.c:2799
705msgid "Socket disconnected while reading request.\n" 709msgid "Socket disconnected while reading request.\n"
706msgstr "" 710msgstr ""
707 711
708#: src/microhttpd/connection.c:2860 712#: src/microhttpd/connection.c:2806
709msgid "Connection socket is closed due to error when reading request.\n" 713msgid "Connection socket is closed due to error when reading request.\n"
710msgstr "" 714msgstr ""
711 715
712#: src/microhttpd/connection.c:2970 716#: src/microhttpd/connection.c:2916
713#, c-format 717#, c-format
714msgid "Failed to send data in request for %s.\n" 718msgid "Failed to send data in request for %s.\n"
715msgstr "" 719msgstr ""
716 720
717#: src/microhttpd/connection.c:2979 721#: src/microhttpd/connection.c:2925
718#, c-format 722#, c-format
719msgid "Sent 100 continue response: `%.*s'\n" 723msgid "Sent 100 continue response: `%.*s'\n"
720msgstr "" 724msgstr ""
721 725
722#: src/microhttpd/connection.c:3022 726#: src/microhttpd/connection.c:2968
723msgid "Connection was closed while sending response headers.\n" 727msgid "Connection was closed while sending response headers.\n"
724msgstr "" 728msgstr ""
725 729
726#: src/microhttpd/connection.c:3074 730#: src/microhttpd/connection.c:3020
727msgid "Data offset exceeds limit" 731msgid "Data offset exceeds limit.\n"
728msgstr "" 732msgstr ""
729 733
730#: src/microhttpd/connection.c:3084 734#: src/microhttpd/connection.c:3030
731#, c-format 735#, c-format
732msgid "Sent %d-byte DATA response: `%.*s'\n" 736msgid "Sent %d-byte DATA response: `%.*s'\n"
733msgstr "" 737msgstr ""
734 738
735#: src/microhttpd/connection.c:3101 739#: src/microhttpd/connection.c:3047
736#, c-format 740#, c-format
737msgid "Failed to send data in request for `%s'.\n" 741msgid "Failed to send data in request for `%s'.\n"
738msgstr "" 742msgstr ""
739 743
740#: src/microhttpd/connection.c:3131 src/microhttpd/connection.c:3161 744#: src/microhttpd/connection.c:3077 src/microhttpd/connection.c:3107
741msgid "Connection was closed while sending response body.\n" 745msgid "Connection was closed while sending response body.\n"
742msgstr "" 746msgstr ""
743 747
744#: src/microhttpd/connection.c:3184 748#: src/microhttpd/connection.c:3130
745msgid "Internal error\n" 749msgid "Internal error.\n"
746msgstr "" 750msgstr ""
747 751
748#: src/microhttpd/connection.c:3258 752#: src/microhttpd/connection.c:3204
749msgid "" 753msgid ""
750"Failed to signal end of connection via inter-thread communication channel" 754"Failed to signal end of connection via inter-thread communication channel.\n"
751msgstr "" 755msgstr ""
752 756
753#: src/microhttpd/connection.c:3983 757#: src/microhttpd/connection.c:3928
754msgid "Attempted to queue response on wrong thread!\n" 758msgid "Attempted to queue response on wrong thread!\n"
755msgstr "" 759msgstr ""
756 760
757#: src/microhttpd/connection.c:3995 761#: src/microhttpd/connection.c:3940
758msgid "" 762msgid ""
759"Attempted 'upgrade' connection on daemon without MHD_ALLOW_UPGRADE option!\n" 763"Attempted 'upgrade' connection on daemon without MHD_ALLOW_UPGRADE option!\n"
760msgstr "" 764msgstr ""
761 765
762#: src/microhttpd/connection.c:4005 766#: src/microhttpd/connection.c:3950
763msgid "Application used invalid status code for 'upgrade' response!\n" 767msgid "Application used invalid status code for 'upgrade' response!\n"
764msgstr "" 768msgstr ""
765 769
@@ -783,7 +787,7 @@ msgid "Socketpair descriptor larger than FD_SETSIZE: %d > %d\n"
783msgstr "" 787msgstr ""
784 788
785#: src/microhttpd/response.c:1076 789#: src/microhttpd/response.c:1076
786msgid "Error cleaning up while handling epoll error" 790msgid "Error cleaning up while handling epoll error.\n"
787msgstr "" 791msgstr ""
788 792
789#: src/microhttpd/mhd_itc.h:355 793#: src/microhttpd/mhd_itc.h:355
@@ -791,17 +795,17 @@ msgid "Failed to destroy ITC.\n"
791msgstr "" 795msgstr ""
792 796
793#: src/microhttpd/basicauth.c:71 797#: src/microhttpd/basicauth.c:71
794msgid "Error decoding basic authentication\n" 798msgid "Error decoding basic authentication.\n"
795msgstr "" 799msgstr ""
796 800
797#: src/microhttpd/basicauth.c:81 801#: src/microhttpd/basicauth.c:81
798msgid "Basic authentication doesn't contain ':' separator\n" 802msgid "Basic authentication doesn't contain ':' separator.\n"
799msgstr "" 803msgstr ""
800 804
801#: src/microhttpd/basicauth.c:99 805#: src/microhttpd/basicauth.c:99
802msgid "Failed to allocate memory for password\n" 806msgid "Failed to allocate memory for password.\n"
803msgstr "" 807msgstr ""
804 808
805#: src/microhttpd/basicauth.c:164 809#: src/microhttpd/basicauth.c:164
806msgid "Failed to add Basic auth header\n" 810msgid "Failed to add Basic auth header.\n"
807msgstr "" 811msgstr ""
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 8848b306..1eb33ed6 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -137,8 +137,7 @@ struct MHD_PostProcessor
137 void *cls; 137 void *cls;
138 138
139 /** 139 /**
140 * Encoding as given by the headers of the 140 * Encoding as given by the headers of the connection.
141 * connection.
142 */ 141 */
143 const char *encoding; 142 const char *encoding;
144 143
@@ -590,7 +589,7 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
590 pp->state = PP_Error; 589 pp->state = PP_Error;
591 break; 590 break;
592 case PP_Callback: 591 case PP_Callback:
593 if ( (pp->buffer_pos + (end_key - start_key) > 592 if ( (pp->buffer_pos + (end_key - start_key) >=
594 pp->buffer_size) || 593 pp->buffer_size) ||
595 (pp->buffer_pos + (end_key - start_key) < 594 (pp->buffer_pos + (end_key - start_key) <
596 pp->buffer_pos) ) 595 pp->buffer_pos) )
@@ -640,6 +639,11 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
640 { 639 {
641 if (NULL == end_key) 640 if (NULL == end_key)
642 end_key = &post_data[poff]; 641 end_key = &post_data[poff];
642 if (pp->buffer_pos + (end_key - start_key) >= pp->buffer_size)
643 {
644 pp->state = PP_Error;
645 return MHD_NO;
646 }
643 memcpy (&kbuf[pp->buffer_pos], 647 memcpy (&kbuf[pp->buffer_pos],
644 start_key, 648 start_key,
645 end_key - start_key); 649 end_key - start_key);
@@ -667,6 +671,11 @@ post_process_urlencoded (struct MHD_PostProcessor *pp,
667 last_escape); 671 last_escape);
668 pp->must_ikvi = false; 672 pp->must_ikvi = false;
669 } 673 }
674 if (PP_Error == pp->state)
675 {
676 /* State in error, returning failure */
677 return MHD_NO;
678 }
670 return MHD_YES; 679 return MHD_YES;
671} 680}
672 681
@@ -1428,7 +1437,8 @@ MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
1428 the post-processing may have been interrupted 1437 the post-processing may have been interrupted
1429 at any stage */ 1438 at any stage */
1430 if ( (pp->xbuf_pos > 0) || 1439 if ( (pp->xbuf_pos > 0) ||
1431 (pp->state != PP_Done) ) 1440 ( (pp->state != PP_Done) &&
1441 (pp->state != PP_Init) ) )
1432 ret = MHD_NO; 1442 ret = MHD_NO;
1433 else 1443 else
1434 ret = MHD_YES; 1444 ret = MHD_YES;
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c
index e70171cc..b62e7ff9 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -451,6 +451,71 @@ test_empty_value (void)
451} 451}
452 452
453 453
454static enum MHD_Result
455value_checker2 (void *cls,
456 enum MHD_ValueKind kind,
457 const char *key,
458 const char *filename,
459 const char *content_type,
460 const char *transfer_encoding,
461 const char *data,
462 uint64_t off,
463 size_t size)
464{
465 return MHD_YES;
466}
467
468
469static int
470test_overflow ()
471{
472 struct MHD_Connection connection;
473 struct MHD_HTTP_Header header;
474 struct MHD_PostProcessor *pp;
475 size_t i;
476 size_t j;
477 size_t delta;
478 char *buf;
479
480 memset (&connection, 0, sizeof (struct MHD_Connection));
481 memset (&header, 0, sizeof (struct MHD_HTTP_Header));
482 connection.headers_received = &header;
483 header.header = MHD_HTTP_HEADER_CONTENT_TYPE;
484 header.value = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
485 header.header_size = strlen (header.header);
486 header.value_size = strlen (header.value);
487 header.kind = MHD_HEADER_KIND;
488 for (i = 128; i < 1024 * 1024; i += 1024)
489 {
490 pp = MHD_create_post_processor (&connection,
491 1024,
492 &value_checker2,
493 NULL);
494 buf = malloc (i);
495 if (NULL == buf)
496 return 1;
497 memset (buf, 'A', i);
498 buf[i / 2] = '=';
499 delta = 1 + (MHD_random_ () % (i - 1));
500 j = 0;
501 while (j < i)
502 {
503 if (j + delta > i)
504 delta = i - j;
505 if (MHD_NO ==
506 MHD_post_process (pp,
507 &buf[j],
508 delta))
509 break;
510 j += delta;
511 }
512 free (buf);
513 MHD_destroy_post_processor (pp);
514 }
515 return 0;
516}
517
518
454int 519int
455main (int argc, char *const *argv) 520main (int argc, char *const *argv)
456{ 521{
@@ -463,6 +528,7 @@ main (int argc, char *const *argv)
463 errorCount += test_multipart (); 528 errorCount += test_multipart ();
464 errorCount += test_nested_multipart (); 529 errorCount += test_nested_multipart ();
465 errorCount += test_empty_value (); 530 errorCount += test_empty_value ();
531 errorCount += test_overflow ();
466 if (errorCount != 0) 532 if (errorCount != 0)
467 fprintf (stderr, "Error (code: %u)\n", errorCount); 533 fprintf (stderr, "Error (code: %u)\n", errorCount);
468 return errorCount != 0; /* 0 == pass */ 534 return errorCount != 0; /* 0 == pass */