aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r--src/include/microhttpd.h235
1 files changed, 124 insertions, 111 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index af19c0fa..7fb6e33c 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -339,114 +339,115 @@ _MHD_DEPR_MACRO ( \
339 * @defgroup httpcode HTTP response codes. 339 * @defgroup httpcode HTTP response codes.
340 * These are the status codes defined for HTTP responses. 340 * These are the status codes defined for HTTP responses.
341 * See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml 341 * See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
342 * Registry export date: 2021-06-08 342 * Registry export date: 2021-10-30
343 * @{ 343 * @{
344 */ 344 */
345 345
346/* 100 "Continue". RFC7231, Section 6.2.1. */ 346/* 100 "Continue". RFC-ietf-httpbis-semantics, Section 15.2.1. */
347#define MHD_HTTP_CONTINUE 100 347#define MHD_HTTP_CONTINUE 100
348/* 101 "Switching Protocols". RFC7231, Section 6.2.2. */ 348/* 101 "Switching Protocols". RFC-ietf-httpbis-semantics, Section 15.2.2. */
349#define MHD_HTTP_SWITCHING_PROTOCOLS 101 349#define MHD_HTTP_SWITCHING_PROTOCOLS 101
350/* 102 "Processing". RFC2518. */ 350/* 102 "Processing". RFC2518. */
351#define MHD_HTTP_PROCESSING 102 351#define MHD_HTTP_PROCESSING 102
352/* 103 "Early Hints". RFC8297. */ 352/* 103 "Early Hints". RFC8297. */
353#define MHD_HTTP_EARLY_HINTS 103 353#define MHD_HTTP_EARLY_HINTS 103
354 354
355/* 200 "OK". RFC7231, Section 6.3.1. */ 355/* 200 "OK". RFC-ietf-httpbis-semantics, Section 15.3.1. */
356#define MHD_HTTP_OK 200 356#define MHD_HTTP_OK 200
357/* 201 "Created". RFC7231, Section 6.3.2. */ 357/* 201 "Created". RFC-ietf-httpbis-semantics, Section 15.3.2. */
358#define MHD_HTTP_CREATED 201 358#define MHD_HTTP_CREATED 201
359/* 202 "Accepted". RFC7231, Section 6.3.3. */ 359/* 202 "Accepted". RFC-ietf-httpbis-semantics, Section 15.3.3. */
360#define MHD_HTTP_ACCEPTED 202 360#define MHD_HTTP_ACCEPTED 202
361/* 203 "Non-Authoritative Information". RFC7231, Section 6.3.4. */ 361/* 203 "Non-Authoritative Information". RFC-ietf-httpbis-semantics, Section 15.3.4. */
362#define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203 362#define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203
363/* 204 "No Content". RFC7231, Section 6.3.5. */ 363/* 204 "No Content". RFC-ietf-httpbis-semantics, Section 15.3.5. */
364#define MHD_HTTP_NO_CONTENT 204 364#define MHD_HTTP_NO_CONTENT 204
365/* 205 "Reset Content". RFC7231, Section 6.3.6. */ 365/* 205 "Reset Content". RFC-ietf-httpbis-semantics, Section 15.3.6. */
366#define MHD_HTTP_RESET_CONTENT 205 366#define MHD_HTTP_RESET_CONTENT 205
367/* 206 "Partial Content". RFC7233, Section 4.1. */ 367/* 206 "Partial Content". RFC-ietf-httpbis-semantics, Section 15.3.7. */
368#define MHD_HTTP_PARTIAL_CONTENT 206 368#define MHD_HTTP_PARTIAL_CONTENT 206
369/* 207 "Multi-Status". RFC4918. */ 369/* 207 "Multi-Status". RFC4918. */
370#define MHD_HTTP_MULTI_STATUS 207 370#define MHD_HTTP_MULTI_STATUS 207
371/* 208 "Already Reported". RFC5842. */ 371/* 208 "Already Reported". RFC5842. */
372#define MHD_HTTP_ALREADY_REPORTED 208 372#define MHD_HTTP_ALREADY_REPORTED 208
373 373
374/* 226 "IM Used". RFC3229. */ 374/* 226 "IM Used". RFC3229. */
375#define MHD_HTTP_IM_USED 226 375#define MHD_HTTP_IM_USED 226
376 376
377/* 300 "Multiple Choices". RFC7231, Section 6.4.1. */ 377/* 300 "Multiple Choices". RFC-ietf-httpbis-semantics, Section 15.4.1. */
378#define MHD_HTTP_MULTIPLE_CHOICES 300 378#define MHD_HTTP_MULTIPLE_CHOICES 300
379/* 301 "Moved Permanently". RFC7231, Section 6.4.2. */ 379/* 301 "Moved Permanently". RFC-ietf-httpbis-semantics, Section 15.4.2. */
380#define MHD_HTTP_MOVED_PERMANENTLY 301 380#define MHD_HTTP_MOVED_PERMANENTLY 301
381/* 302 "Found". RFC7231, Section 6.4.3. */ 381/* 302 "Found". RFC-ietf-httpbis-semantics, Section 15.4.3. */
382#define MHD_HTTP_FOUND 302 382#define MHD_HTTP_FOUND 302
383/* 303 "See Other". RFC7231, Section 6.4.4. */ 383/* 303 "See Other". RFC-ietf-httpbis-semantics, Section 15.4.4. */
384#define MHD_HTTP_SEE_OTHER 303 384#define MHD_HTTP_SEE_OTHER 303
385/* 304 "Not Modified". RFC7232, Section 4.1. */ 385/* 304 "Not Modified". RFC-ietf-httpbis-semantics, Section 15.4.5. */
386#define MHD_HTTP_NOT_MODIFIED 304 386#define MHD_HTTP_NOT_MODIFIED 304
387/* 305 "Use Proxy". RFC7231, Section 6.4.5. */ 387/* 305 "Use Proxy". RFC-ietf-httpbis-semantics, Section 15.4.6. */
388#define MHD_HTTP_USE_PROXY 305 388#define MHD_HTTP_USE_PROXY 305
389/* 306 "Switch Proxy". Not used! RFC7231, Section 6.4.6. */ 389/* 306 "Switch Proxy". Not used! RFC-ietf-httpbis-semantics, Section 15.4.7. */
390#define MHD_HTTP_SWITCH_PROXY 306 390#define MHD_HTTP_SWITCH_PROXY 306
391/* 307 "Temporary Redirect". RFC7231, Section 6.4.7. */ 391/* 307 "Temporary Redirect". RFC-ietf-httpbis-semantics, Section 15.4.8. */
392#define MHD_HTTP_TEMPORARY_REDIRECT 307 392#define MHD_HTTP_TEMPORARY_REDIRECT 307
393/* 308 "Permanent Redirect". RFC7538. */ 393/* 308 "Permanent Redirect". RFC-ietf-httpbis-semantics, Section 15.4.9. */
394#define MHD_HTTP_PERMANENT_REDIRECT 308 394#define MHD_HTTP_PERMANENT_REDIRECT 308
395 395
396/* 400 "Bad Request". RFC7231, Section 6.5.1. */ 396/* 400 "Bad Request". RFC-ietf-httpbis-semantics, Section 15.5.1. */
397#define MHD_HTTP_BAD_REQUEST 400 397#define MHD_HTTP_BAD_REQUEST 400
398/* 401 "Unauthorized". RFC7235, Section 3.1. */ 398/* 401 "Unauthorized". RFC-ietf-httpbis-semantics, Section 15.5.2. */
399#define MHD_HTTP_UNAUTHORIZED 401 399#define MHD_HTTP_UNAUTHORIZED 401
400/* 402 "Payment Required". RFC7231, Section 6.5.2. */ 400/* 402 "Payment Required". RFC-ietf-httpbis-semantics, Section 15.5.3. */
401#define MHD_HTTP_PAYMENT_REQUIRED 402 401#define MHD_HTTP_PAYMENT_REQUIRED 402
402/* 403 "Forbidden". RFC7231, Section 6.5.3. */ 402/* 403 "Forbidden". RFC-ietf-httpbis-semantics, Section 15.5.4. */
403#define MHD_HTTP_FORBIDDEN 403 403#define MHD_HTTP_FORBIDDEN 403
404/* 404 "Not Found". RFC7231, Section 6.5.4. */ 404/* 404 "Not Found". RFC-ietf-httpbis-semantics, Section 15.5.5. */
405#define MHD_HTTP_NOT_FOUND 404 405#define MHD_HTTP_NOT_FOUND 404
406/* 405 "Method Not Allowed". RFC7231, Section 6.5.5. */ 406/* 405 "Method Not Allowed". RFC-ietf-httpbis-semantics, Section 15.5.6. */
407#define MHD_HTTP_METHOD_NOT_ALLOWED 405 407#define MHD_HTTP_METHOD_NOT_ALLOWED 405
408/* 406 "Not Acceptable". RFC7231, Section 6.5.6. */ 408/* 406 "Not Acceptable". RFC-ietf-httpbis-semantics, Section 15.5.7. */
409#define MHD_HTTP_NOT_ACCEPTABLE 406 409#define MHD_HTTP_NOT_ACCEPTABLE 406
410/* 407 "Proxy Authentication Required". RFC7235, Section 3.2. */ 410/* 407 "Proxy Authentication Required". RFC-ietf-httpbis-semantics, Section 15.5.8. */
411#define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407 411#define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
412/* 408 "Request Timeout". RFC7231, Section 6.5.7. */ 412/* 408 "Request Timeout". RFC-ietf-httpbis-semantics, Section 15.5.9. */
413#define MHD_HTTP_REQUEST_TIMEOUT 408 413#define MHD_HTTP_REQUEST_TIMEOUT 408
414/* 409 "Conflict". RFC7231, Section 6.5.8. */ 414/* 409 "Conflict". RFC-ietf-httpbis-semantics, Section 15.5.10. */
415#define MHD_HTTP_CONFLICT 409 415#define MHD_HTTP_CONFLICT 409
416/* 410 "Gone". RFC7231, Section 6.5.9. */ 416/* 410 "Gone". RFC-ietf-httpbis-semantics, Section 15.5.11. */
417#define MHD_HTTP_GONE 410 417#define MHD_HTTP_GONE 410
418/* 411 "Length Required". RFC7231, Section 6.5.10. */ 418/* 411 "Length Required". RFC-ietf-httpbis-semantics, Section 15.5.12. */
419#define MHD_HTTP_LENGTH_REQUIRED 411 419#define MHD_HTTP_LENGTH_REQUIRED 411
420/* 412 "Precondition Failed". RFC7232, Section 4.2; RFC8144, Section 3.2. */ 420/* 412 "Precondition Failed". RFC-ietf-httpbis-semantics, Section 15.5.13. */
421#define MHD_HTTP_PRECONDITION_FAILED 412 421#define MHD_HTTP_PRECONDITION_FAILED 412
422/* 413 "Payload Too Large". RFC7231, Section 6.5.11. */ 422/* 413 "Content Too Large". RFC-ietf-httpbis-semantics, Section 15.5.14. */
423#define MHD_HTTP_PAYLOAD_TOO_LARGE 413 423#define MHD_HTTP_CONTENT_TOO_LARGE 413
424/* 414 "URI Too Long". RFC7231, Section 6.5.12. */ 424/* 414 "URI Too Long". RFC-ietf-httpbis-semantics, Section 15.5.15. */
425#define MHD_HTTP_URI_TOO_LONG 414 425#define MHD_HTTP_URI_TOO_LONG 414
426/* 415 "Unsupported Media Type". RFC7231, Section 6.5.13; RFC7694, Section 3. */ 426/* 415 "Unsupported Media Type". RFC-ietf-httpbis-semantics, Section 15.5.16. */
427#define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415 427#define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415
428/* 416 "Range Not Satisfiable". RFC7233, Section 4.4. */ 428/* 416 "Range Not Satisfiable". RFC-ietf-httpbis-semantics, Section 15.5.17. */
429#define MHD_HTTP_RANGE_NOT_SATISFIABLE 416 429#define MHD_HTTP_RANGE_NOT_SATISFIABLE 416
430/* 417 "Expectation Failed". RFC7231, Section 6.5.14. */ 430/* 417 "Expectation Failed". RFC-ietf-httpbis-semantics, Section 15.5.18. */
431#define MHD_HTTP_EXPECTATION_FAILED 417 431#define MHD_HTTP_EXPECTATION_FAILED 417
432 432
433/* 421 "Misdirected Request". RFC7540, Section 9.1.2. */ 433
434#define MHD_HTTP_MISDIRECTED_REQUEST 421 434/* 421 "Misdirected Request". RFC-ietf-httpbis-semantics, Section 15.5.20. */
435/* 422 "Unprocessable Entity". RFC4918. */ 435#define MHD_HTTP_MISDIRECTED_REQUEST 421
436#define MHD_HTTP_UNPROCESSABLE_ENTITY 422 436/* 422 "Unprocessable Content". RFC-ietf-httpbis-semantics, Section 15.5.21. */
437#define MHD_HTTP_UNPROCESSABLE_CONTENT 422
437/* 423 "Locked". RFC4918. */ 438/* 423 "Locked". RFC4918. */
438#define MHD_HTTP_LOCKED 423 439#define MHD_HTTP_LOCKED 423
439/* 424 "Failed Dependency". RFC4918. */ 440/* 424 "Failed Dependency". RFC4918. */
440#define MHD_HTTP_FAILED_DEPENDENCY 424 441#define MHD_HTTP_FAILED_DEPENDENCY 424
441/* 425 "Too Early". RFC8470. */ 442/* 425 "Too Early". RFC8470. */
442#define MHD_HTTP_TOO_EARLY 425 443#define MHD_HTTP_TOO_EARLY 425
443/* 426 "Upgrade Required". RFC7231, Section 6.5.15. */ 444/* 426 "Upgrade Required". RFC-ietf-httpbis-semantics, Section 15.5.22. */
444#define MHD_HTTP_UPGRADE_REQUIRED 426 445#define MHD_HTTP_UPGRADE_REQUIRED 426
445 446
446/* 428 "Precondition Required". RFC6585. */ 447/* 428 "Precondition Required". RFC6585. */
447#define MHD_HTTP_PRECONDITION_REQUIRED 428 448#define MHD_HTTP_PRECONDITION_REQUIRED 428
448/* 429 "Too Many Requests". RFC6585. */ 449/* 429 "Too Many Requests". RFC6585. */
449#define MHD_HTTP_TOO_MANY_REQUESTS 429 450#define MHD_HTTP_TOO_MANY_REQUESTS 429
450 451
451/* 431 "Request Header Fields Too Large". RFC6585. */ 452/* 431 "Request Header Fields Too Large". RFC6585. */
452#define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431 453#define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
@@ -454,43 +455,43 @@ _MHD_DEPR_MACRO ( \
454/* 451 "Unavailable For Legal Reasons". RFC7725. */ 455/* 451 "Unavailable For Legal Reasons". RFC7725. */
455#define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451 456#define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
456 457
457/* 500 "Internal Server Error". RFC7231, Section 6.6.1. */ 458/* 500 "Internal Server Error". RFC-ietf-httpbis-semantics, Section 15.6.1. */
458#define MHD_HTTP_INTERNAL_SERVER_ERROR 500 459#define MHD_HTTP_INTERNAL_SERVER_ERROR 500
459/* 501 "Not Implemented". RFC7231, Section 6.6.2. */ 460/* 501 "Not Implemented". RFC-ietf-httpbis-semantics, Section 15.6.2. */
460#define MHD_HTTP_NOT_IMPLEMENTED 501 461#define MHD_HTTP_NOT_IMPLEMENTED 501
461/* 502 "Bad Gateway". RFC7231, Section 6.6.3. */ 462/* 502 "Bad Gateway". RFC-ietf-httpbis-semantics, Section 15.6.3. */
462#define MHD_HTTP_BAD_GATEWAY 502 463#define MHD_HTTP_BAD_GATEWAY 502
463/* 503 "Service Unavailable". RFC7231, Section 6.6.4. */ 464/* 503 "Service Unavailable". RFC-ietf-httpbis-semantics, Section 15.6.4. */
464#define MHD_HTTP_SERVICE_UNAVAILABLE 503 465#define MHD_HTTP_SERVICE_UNAVAILABLE 503
465/* 504 "Gateway Timeout". RFC7231, Section 6.6.5. */ 466/* 504 "Gateway Timeout". RFC-ietf-httpbis-semantics, Section 15.6.5. */
466#define MHD_HTTP_GATEWAY_TIMEOUT 504 467#define MHD_HTTP_GATEWAY_TIMEOUT 504
467/* 505 "HTTP Version Not Supported". RFC7231, Section 6.6.6. */ 468/* 505 "HTTP Version Not Supported". RFC-ietf-httpbis-semantics, Section 15.6.6. */
468#define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505 469#define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
469/* 506 "Variant Also Negotiates". RFC2295. */ 470/* 506 "Variant Also Negotiates". RFC2295. */
470#define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506 471#define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506
471/* 507 "Insufficient Storage". RFC4918. */ 472/* 507 "Insufficient Storage". RFC4918. */
472#define MHD_HTTP_INSUFFICIENT_STORAGE 507 473#define MHD_HTTP_INSUFFICIENT_STORAGE 507
473/* 508 "Loop Detected". RFC5842. */ 474/* 508 "Loop Detected". RFC5842. */
474#define MHD_HTTP_LOOP_DETECTED 508 475#define MHD_HTTP_LOOP_DETECTED 508
475 476
476/* 510 "Not Extended". RFC2774. */ 477/* 510 "Not Extended". RFC2774. */
477#define MHD_HTTP_NOT_EXTENDED 510 478#define MHD_HTTP_NOT_EXTENDED 510
478/* 511 "Network Authentication Required". RFC6585. */ 479/* 511 "Network Authentication Required". RFC6585. */
479#define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511 480#define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
480 481
481 482
482/* Not registered non-standard codes */ 483/* Not registered non-standard codes */
483/* 449 "Reply With". MS IIS extension. */ 484/* 449 "Reply With". MS IIS extension. */
484#define MHD_HTTP_RETRY_WITH 449 485#define MHD_HTTP_RETRY_WITH 449
485 486
486/* 450 "Blocked by Windows Parental Controls". MS extension. */ 487/* 450 "Blocked by Windows Parental Controls". MS extension. */
487#define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450 488#define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
488 489
489/* 509 "Bandwidth Limit Exceeded". Apache extension. */ 490/* 509 "Bandwidth Limit Exceeded". Apache extension. */
490#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509 491#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
491 492
492 493
493/* Deprecated codes */ 494/* Deprecated names and codes */
494/** @deprecated */ 495/** @deprecated */
495#define MHD_HTTP_METHOD_NOT_ACCEPTABLE \ 496#define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
496 _MHD_DEPR_IN_MACRO ( \ 497 _MHD_DEPR_IN_MACRO ( \
@@ -500,7 +501,13 @@ _MHD_DEPR_MACRO ( \
500/** @deprecated */ 501/** @deprecated */
501#define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \ 502#define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \
502 _MHD_DEPR_IN_MACRO ( \ 503 _MHD_DEPR_IN_MACRO ( \
503 "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_PAYLOAD_TOO_LARGE") \ 504 "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_CONTENT_TOO_LARGE") \
505 413
506
507/** @deprecated */
508#define MHD_HTTP_PAYLOAD_TOO_LARGE \
509 _MHD_DEPR_IN_MACRO ( \
510 "Value MHD_HTTP_PAYLOAD_TOO_LARGE is deprecated, use MHD_HTTP_CONTENT_TOO_LARGE") \
504 413 511 413
505 512
506/** @deprecated */ 513/** @deprecated */
@@ -516,6 +523,12 @@ _MHD_DEPR_MACRO ( \
516 416 523 416
517 524
518/** @deprecated */ 525/** @deprecated */
526#define MHD_HTTP_UNPROCESSABLE_ENTITY \
527 _MHD_DEPR_IN_MACRO ( \
528 "Value MHD_HTTP_UNPROCESSABLE_ENTITY is deprecated, use MHD_HTTP_UNPROCESSABLE_CONTENT") \
529 422
530
531/** @deprecated */
519#define MHD_HTTP_UNORDERED_COLLECTION \ 532#define MHD_HTTP_UNORDERED_COLLECTION \
520 _MHD_DEPR_IN_MACRO ( \ 533 _MHD_DEPR_IN_MACRO ( \
521 "Value MHD_HTTP_UNORDERED_COLLECTION is deprecated as it was removed from RFC") \ 534 "Value MHD_HTTP_UNORDERED_COLLECTION is deprecated as it was removed from RFC") \