Annotation of embedaddon/libpdel/http/http_defs.h, revision 1.1.1.1
1.1 misho 1:
2: /*
3: * Copyright (c) 2001-2002 Packet Design, LLC.
4: * All rights reserved.
5: *
6: * Subject to the following obligations and disclaimer of warranty,
7: * use and redistribution of this software, in source or object code
8: * forms, with or without modifications are expressly permitted by
9: * Packet Design; provided, however, that:
10: *
11: * (i) Any and all reproductions of the source or object code
12: * must include the copyright notice above and the following
13: * disclaimer of warranties; and
14: * (ii) No rights are granted, in any manner or form, to use
15: * Packet Design trademarks, including the mark "PACKET DESIGN"
16: * on advertising, endorsements, or otherwise except as such
17: * appears in the above copyright notice or in the software.
18: *
19: * THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
20: * TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
21: * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
22: * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
23: * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
24: * OR NON-INFRINGEMENT. PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
25: * OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
26: * OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
27: * RELIABILITY OR OTHERWISE. IN NO EVENT SHALL PACKET DESIGN BE
28: * LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
29: * OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
30: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
31: * DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
32: * USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
33: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
35: * THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
36: * THE POSSIBILITY OF SUCH DAMAGE.
37: *
38: * Author: Archie Cobbs <archie@freebsd.org>
39: */
40:
41: #ifndef _PDEL_HTTP_HTTP_DEFS_H_
42: #define _PDEL_HTTP_HTTP_DEFS_H_
43:
44: /*
45: * HTTP ports
46: */
47: #define HTTP_PORT 80
48: #define HTTPS_PORT 443
49: #define PROXY_PORT 3128
50:
51: /*
52: * HTTP time format for "Date" header
53: */
54: #define HTTP_TIME_FMT_RFC1123 "%a, %d %b %Y %H:%M:%S GMT"
55: #define HTTP_TIME_FMT_RFC850 "%A, %d-%b-%y %H:%M:%S GMT" /* obsolete */
56: #define HTTP_TIME_FMT_CTIME "%c" /* obsolete */
57:
58: /*
59: * Known HTTP protocol versions
60: */
61: #define HTTP_PROTO_0_9 "HTTP/0.9"
62: #define HTTP_PROTO_1_0 "HTTP/1.0"
63: #define HTTP_PROTO_1_1 "HTTP/1.1"
64:
65: /*
66: * HTTP methods
67: */
68: #define HTTP_METHOD_OPTIONS "OPTIONS"
69: #define HTTP_METHOD_GET "GET"
70: #define HTTP_METHOD_HEAD "HEAD"
71: #define HTTP_METHOD_POST "POST"
72: #define HTTP_METHOD_PUT "PUT"
73: #define HTTP_METHOD_DELETE "DELETE"
74: #define HTTP_METHOD_TRACE "TRACE"
75: #define HTTP_METHOD_CONNECT "CONNECT"
76:
77: /*
78: * HTTP headers
79: */
80: #define HTTP_HEADER_ACCEPT "Accept"
81: #define HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
82: #define HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"
83: #define HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
84: #define HTTP_HEADER_AUTHORIZATION "Authorization"
85: #define HTTP_HEADER_CACHE_CONTROL "Cache-Control"
86: #define HTTP_HEADER_CONNECTION "Connection"
87: #define HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition"
88: #define HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
89: #define HTTP_HEADER_CONTENT_LENGTH "Content-Length"
90: #define HTTP_HEADER_CONTENT_TYPE "Content-Type"
91: #define HTTP_HEADER_COOKIE "Cookie"
92: #define HTTP_HEADER_DATE "Date"
93: #define HTTP_HEADER_EXPIRES "Expires"
94: #define HTTP_HEADER_HOST "Host"
95: #define HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since"
96: #define HTTP_HEADER_KEEP_ALIVE "Keep-Alive"
97: #define HTTP_HEADER_LAST_MODIFIED "Last-Modified"
98: #define HTTP_HEADER_LOCATION "Location"
99: #define HTTP_HEADER_PRAGMA "Pragma"
100: #define HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
101: #define HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
102: #define HTTP_HEADER_PROXY_CONNECTION "Proxy-Connection"
103: #define HTTP_HEADER_SERVER "Server"
104: #define HTTP_HEADER_SET_COOKIE "Set-Cookie"
105: #define HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
106: #define HTTP_HEADER_USER_AGENT "User-Agent"
107: #define HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
108:
109: /*
110: * MIME content types
111: */
112: #define HTTP_CTYPE_FORM_URLENCODED "application/x-www-form-urlencoded"
113: #define HTTP_CTYPE_MULTIPART_FORMDATA "multipart/form-data"
114: #define HTTP_CTYPE_APPLICATION_OCTETS "application/octet-stream"
115:
116: /*
117: * HTTP status codes
118: */
119: #define HTTP_STATUS_CONTINUE 100
120: #define HTTP_STATUS_SWITCHING_PROTOCOLS 101
121: #define HTTP_STATUS_OK 200
122: #define HTTP_STATUS_CREATED 201
123: #define HTTP_STATUS_ACCEPTED 202
124: #define HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION 203
125: #define HTTP_STATUS_NO_CONTENT 204
126: #define HTTP_STATUS_RESET_CONTENT 205
127: #define HTTP_STATUS_PARTIAL_CONTENT 206
128: #define HTTP_STATUS_MULTIPLE_CHOICES 300
129: #define HTTP_STATUS_MOVED_PERMANENTLY 301
130: #define HTTP_STATUS_FOUND 302
131: #define HTTP_STATUS_SEE_OTHER 303
132: #define HTTP_STATUS_NOT_MODIFIED 304
133: #define HTTP_STATUS_USE_PROXY 305
134: #define HTTP_STATUS_TEMPORARY_REDIRECT 307
135: #define HTTP_STATUS_BAD_REQUEST 400
136: #define HTTP_STATUS_UNAUTHORIZED 401
137: #define HTTP_STATUS_PAYMENT_REQUIRED 402
138: #define HTTP_STATUS_FORBIDDEN 403
139: #define HTTP_STATUS_NOT_FOUND 404
140: #define HTTP_STATUS_METHOD_NOT_ALLOWED 405
141: #define HTTP_STATUS_NOT_ACCEPTABLE 406
142: #define HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED 407
143: #define HTTP_STATUS_REQUEST_TIME_OUT 408
144: #define HTTP_STATUS_CONFLICT 409
145: #define HTTP_STATUS_GONE 410
146: #define HTTP_STATUS_LENGTH_REQUIRED 411
147: #define HTTP_STATUS_PRECONDITION_FAILED 412
148: #define HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE 413
149: #define HTTP_STATUS_REQUEST_URI_TOO_LARGE 414
150: #define HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE 415
151: #define HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE 416
152: #define HTTP_STATUS_EXPECTATION_FAILED 417
153: #define HTTP_STATUS_INTERNAL_SERVER_ERROR 500
154: #define HTTP_STATUS_NOT_IMPLEMENTED 501
155: #define HTTP_STATUS_BAD_GATEWAY 502
156: #define HTTP_STATUS_SERVICE_UNAVAILABLE 503
157: #define HTTP_STATUS_GATEWAY_TIME_OUT 504
158: #define HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED 505
159:
160: #endif /* _PDEL_HTTP_HTTP_DEFS_H_ */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>