UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
statcodes.hpp
Go to the documentation of this file.
1#ifndef COMPA_GENLIB_NET_HTTP_STATCODES_HPP
2#define COMPA_GENLIB_NET_HTTP_STATCODES_HPP
3/*******************************************************************************
4 *
5 * Copyright (c) 2000-2003 Intel Corporation
6 * All rights reserved.
7 * Copyright (C) 2021+ GPL 3 and higher by Ingo Höft, <Ingo@Hoeft-online.de>
8 * Redistribution only with this Copyright remark. Last modified: 2025-06-12
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 *
13 * - Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * - Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * - Neither name of Intel Corporation nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
26 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
30 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 ******************************************************************************/
44
45/* HTTP response status codes */
47#define HTTP_CONTINUE 100
48#define HTTP_SWITCHING_PROCOTOLS 101
49
50#define HTTP_OK 200
51#define HTTP_CREATED 201
52#define HTTP_ACCEPTED 202
53#define HTTP_NON_AUTHORATATIVE 203
54#define HTTP_NO_CONTENT 204
55#define HTTP_RESET_CONTENT 205
56#define HTTP_PARTIAL_CONTENT 206
57
58#define HTTP_MULTIPLE_CHOICES 300
59#define HTTP_MOVED_PERMANENTLY 301
60#define HTTP_FOUND 302
61#define HTTP_SEE_OTHER 303
62#define HTTP_NOT_MODIFIED 304
63#define HTTP_USE_PROXY 305
64#define HTTP_UNUSED_3XX 306
65#define HTTP_TEMPORARY_REDIRECT 307
66
67#define HTTP_BAD_REQUEST 400
68#define HTTP_UNAUTHORIZED 401
69#define HTTP_PAYMENT_REQD 402
70#define HTTP_FORBIDDEN 403
71#define HTTP_NOT_FOUND 404
72#define HTTP_METHOD_NOT_ALLOWED 405
73#define HTTP_NOT_ACCEPTABLE 406
74#define HTTP_PROXY_AUTH_REQD 407
75#define HTTP_REQUEST_TIMEOUT 408
76#define HTTP_CONFLICT 409
77#define HTTP_GONE 410
78#define HTTP_LENGTH_REQUIRED 411
79#define HTTP_PRECONDITION_FAILED 412
80#define HTTP_REQ_ENTITY_TOO_LARGE 413
81#define HTTP_REQ_URI_TOO_LONG 414
82#define HTTP_UNSUPPORTED_MEDIA_TYPE 415
83#define HTTP_REQUEST_RANGE_NOT_SATISFIABLE 416
84#define HTTP_EXPECTATION_FAILED 417
85
86#define HTTP_INTERNAL_SERVER_ERROR 500
87#define HTTP_NOT_IMPLEMENTED 501
88#define HTTP_BAD_GATEWAY 502
89#define HTTP_SERVICE_UNAVAILABLE 503
90#define HTTP_GATEWAY_TIMEOUT 504
91#define HTTP_HTTP_VERSION_NOT_SUPPORTED 505
92#define HTTP_VARIANT_ALSO_NEGOTIATES 506
93#define HTTP_INSUFFICIENT_STORAGE 507
94#define HTTP_LOOP_DETECTED 508
95#define HTTP_NOT_EXTENDED 510
96
97/* HTTP lib error codes */
98
99#define HTTP_E_OUT_OF_MEMORY -2
100#define HTTP_E_BAD_MSG_FORMAT -3
101#define HTTP_E_TIMEDOUT -4
102#define HTTP_E_FILE_READ -5
104
111const char* http_get_code_text(
113 int statusCode);
114
115#endif /* COMPA_GENLIB_NET_HTTP_STATCODES_HPP */
const char * http_get_code_text(int statusCode)
Return the right status message based on the passed in int statusCode input parameter.
Macros to support visibility of external symbols.