|
2250
|
1 # ==================================================================== |
|
|
2 # |
|
|
3 # httpd.cdl |
|
|
4 # |
|
|
5 # HTTP server configuration data |
|
|
6 # |
|
|
7 # ==================================================================== |
|
|
8 #####ECOSGPLCOPYRIGHTBEGIN#### |
|
|
9 ## ------------------------------------------- |
|
|
10 ## This file is part of eCos, the Embedded Configurable Operating System. |
|
|
11 ## Copyright (C) 2005 eCosCentric Ltd. |
|
|
12 ## |
|
|
13 ## eCos is free software; you can redistribute it and/or modify it under |
|
|
14 ## the terms of the GNU General Public License as published by the Free |
|
|
15 ## Software Foundation; either version 2 or (at your option) any later version. |
|
|
16 ## |
|
|
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY |
|
|
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
|
19 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
|
20 ## for more details. |
|
|
21 ## |
|
|
22 ## You should have received a copy of the GNU General Public License along |
|
|
23 ## with eCos; if not, write to the Free Software Foundation, Inc., |
|
|
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
|
|
25 ## |
|
|
26 ## As a special exception, if other files instantiate templates or use macros |
|
|
27 ## or inline functions from this file, or you compile this file and link it |
|
|
28 ## with other works to produce a work based on this file, this file does not |
|
|
29 ## by itself cause the resulting work to be covered by the GNU General Public |
|
|
30 ## License. However the source code for this file must still be made available |
|
|
31 ## in accordance with section (3) of the GNU General Public License. |
|
|
32 ## |
|
|
33 ## This exception does not invalidate any other reasons why a work based on |
|
|
34 ## this file might be covered by the GNU General Public License. |
|
|
35 ## |
|
|
36 ## ------------------------------------------- |
|
|
37 #####ECOSGPLCOPYRIGHTEND#### |
|
|
38 # ==================================================================== |
|
|
39 ######DESCRIPTIONBEGIN#### |
|
|
40 # |
|
|
41 # Author(s): Anthony Tonizzo (atonizzo@gmail.com) |
|
2326
|
42 # Contributors: Lars Povlsen (lpovlsen@vitesse.com) |
|
2250
|
43 # Date: 2006-06-09 |
|
|
44 # |
|
|
45 #####DESCRIPTIONEND#### |
|
|
46 # |
|
|
47 # ==================================================================== |
|
|
48 |
|
|
49 cdl_package CYGPKG_ATHTTPD { |
|
|
50 display "Another Tiny HTTP server" |
|
2265
|
51 description "This package provides a small footprint web server for eCos |
|
2250
|
52 with configurable features." |
|
|
53 include_dir cyg/athttpd |
|
|
54 include_files auth.h digcalc.h forms.h global.h handler.h http.h md5.h socket.h cgi.h jim.h |
|
|
55 compile forms.c handler.c http.c socket.c cgi.c |
|
|
56 requires CYGPKG_NET |
|
2326
|
57 requires CYGPKG_NET_STACK_INET |
|
2250
|
58 requires !CYGPKG_HTTPD |
|
2326
|
59 requires CYGINT_ISO_STDIO_STREAMS |
|
|
60 requires CYGINT_ISO_STDIO_FILEACCESS |
|
|
61 requires CYGINT_ISO_STDIO_FORMATTED_IO |
|
|
62 requires CYGINT_ISO_STRING_MEMFUNCS |
|
|
63 requires CYGINT_ISO_STRING_STRFUNCS |
|
|
64 requires CYGINT_ISO_STRING_BSD_FUNCS |
|
|
65 requires CYGINT_ISO_C_CLOCK_FUNCS |
|
|
66 requires CYGINT_ISO_MALLOC |
|
|
67 requires CYGINT_ISO_CTYPE |
|
|
68 |
|
2250
|
69 # ==================================================================== |
|
|
70 |
|
|
71 cdl_component CYGPKG_NET_ATHTTPD_THREADOPT { |
|
|
72 display "Thread settings" |
|
|
73 flavor none |
|
|
74 no_define |
|
2265
|
75 description "Options to change certain thread values." |
|
2250
|
76 |
|
|
77 cdl_option CYGNUM_NET_ATHTTPD_THREADOPT_PRIORITY { |
|
|
78 display "Thread priority" |
|
|
79 flavor data |
|
|
80 default_value { CYGNUM_KERNEL_SCHED_PRIORITIES/2 } |
|
|
81 legal_values 0 to CYGNUM_KERNEL_SCHED_PRIORITIES |
|
|
82 description "The HTTP server threads can be run at any priority. |
|
|
83 The exact priority depends on the importance of the |
|
|
84 server relative to the rest of the system. The default |
|
|
85 is to put it in the middle of the priority range to provide |
|
|
86 reasonable response without impacting genuine high |
|
|
87 priority threads." |
|
|
88 } |
|
|
89 |
|
|
90 cdl_option CYGNUM_NET_ATHTTPD_THREADOPT_STACKSIZE { |
|
|
91 display "Thread stack size" |
|
|
92 flavor data |
|
|
93 default_value 4096 |
|
|
94 description "This is the amount of extra stack to be allocated for |
|
|
95 the HTTPD thread. This value is added to |
|
|
96 CYGNUM_HAL_STACK_SIZE_MINIMUM to determine the final |
|
2265
|
97 size of the stack for the server." |
|
2250
|
98 } |
|
|
99 } |
|
|
100 |
|
|
101 cdl_component CYGOPT_NET_ATHTTPD_SERVEROPT { |
|
|
102 display "Server settings" |
|
|
103 flavor none |
|
|
104 no_define |
|
2265
|
105 description "Options to change certain server options." |
|
2250
|
106 |
|
|
107 cdl_option CYGNUM_NET_ATHTTPD_SERVEROPT_PORT { |
|
|
108 display "Server Port" |
|
|
109 flavor data |
|
|
110 default_value 80 |
|
2265
|
111 description "This is the port on which the server will be listening |
|
2250
|
112 for requests. Unless overridden in the request by the |
|
|
113 client, the well known port for HTTP is 80." |
|
|
114 } |
|
|
115 |
|
|
116 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_SERVERID { |
|
|
117 display "Server ID string" |
|
|
118 flavor data |
|
|
119 default_value {"\"eCos Embedded Web Server\""} |
|
2265
|
120 description "This is the string sent out in the 'Server:' header line." |
|
2250
|
121 } |
|
|
122 |
|
|
123 cdl_option CYGNUM_ATHTTPD_SERVER_BUFFER_SIZE { |
|
|
124 display "IO buffer size" |
|
|
125 flavor data |
|
|
126 default_value 2048 |
|
|
127 description "This option defines the size of the buffers used to |
|
|
128 receive and transmit transmit data to and from the TCP/IP |
|
|
129 stack." |
|
|
130 } |
|
|
131 |
|
2326
|
132 cdl_option CYGNUM_ATHTTPD_SERVER_MAX_POST { |
|
|
133 display "Maximum data received upon POST" |
|
|
134 flavor data |
|
|
135 default_value 2048 |
|
|
136 description "This option defines the size of maximum amount of data |
|
|
137 the web server will accept from POST'ed forms." |
|
|
138 } |
|
|
139 |
|
2250
|
140 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_ROOTDIR { |
|
|
141 display "HTTPD root directory" |
|
|
142 flavor data |
|
|
143 default_value {"\"/\""} |
|
|
144 description "This is the absolute path in the eCos file system to the |
|
2265
|
145 HTML documents, including cgi-bin files and error |
|
2250
|
146 files and it is generally where the web server will |
|
2265
|
147 look for the index file. Include a trailing slash." |
|
2250
|
148 } |
|
|
149 |
|
|
150 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_CGIDIR { |
|
|
151 display "cgi-bin directory" |
|
2265
|
152 active_if { 0 != CYGOPT_NET_ATHTTPD_USE_CGIBIN_OBJLOADER || 0 != CYGOPT_NET_ATHTTPD_USE_CGIBIN_TCL } |
|
2250
|
153 flavor data |
|
|
154 default_value {"\"cgi-bin/\""} |
|
|
155 description "This is the path, relative to CYGDAT_NET_ATHTTPD_SERVEROPT_ROOTDIR, |
|
2265
|
156 where the cgi-bin files are stored. Based on the extension |
|
|
157 of the cgi-bin file requested, the appropriate interpreter |
|
|
158 will be used. Include a trailing slash." |
|
2250
|
159 } |
|
|
160 |
|
|
161 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_ERRORDIR { |
|
|
162 display "Error files directory" |
|
|
163 flavor data |
|
|
164 default_value {"\"errors/\""} |
|
2265
|
165 description "This is the path, relative to the CYGDAT_NET_ATHTTPD_SERVEROPT_ROOTDIR, |
|
2250
|
166 that contains the user-defined files that are sent out |
|
|
167 by the server in case of error. The files are named |
|
2265
|
168 error_XXX.html where XXX is the 3 digit HTML code. |
|
|
169 For example, for a 404 error the server file will be |
|
2250
|
170 named error_404.html. Upon a 404 error, the server will |
|
|
171 check the existence of such a file in this directory and |
|
|
172 if found, it will send it out. Missing that file, a |
|
2265
|
173 standard simple message will be sent instead. Include |
|
|
174 a trailing slash." |
|
2250
|
175 } |
|
|
176 |
|
|
177 cdl_option CYGDAT_NET_ATHTTPD_DEFAULT_MIME_TYPE { |
|
|
178 display "Default MIME type" |
|
|
179 flavor data |
|
|
180 default_value {"\"text/plain\""} |
|
|
181 description "When accessing internal resources or a file system, |
|
2265
|
182 the MIME type is determined by first finding the extension |
|
|
183 of the file itself and then by looking up the extension |
|
|
184 in the MIME table. In case no extension is found the user |
|
|
185 can define the default MIME type to use. Notice that |
|
2250
|
186 this is the full MIME type and not the extension. |
|
|
187 A list of standard MIME types sorted by extension can |
|
2265
|
188 be found in the current/doc directory" |
|
2250
|
189 } |
|
|
190 |
|
|
191 cdl_option CYGDAT_NET_ATHTTPD_ALTERNATE_HOME { |
|
|
192 display "User defined Home Page" |
|
|
193 flavor booldata |
|
|
194 default_value {"\"/index.html\""} |
|
2265
|
195 description "This file name defines the name of a custom index file |
|
|
196 and is used in case none of the default index files are |
|
2250
|
197 found in a directory. Notice that this file name is |
|
|
198 only appended to GET requests for \"/\"" |
|
|
199 } |
|
|
200 } |
|
|
201 |
|
|
202 cdl_option CYGOPT_NET_ATHTTPD_USE_FS { |
|
|
203 display "Support for file system access" |
|
|
204 flavor bool |
|
|
205 default_value 1 |
|
|
206 active_if CYGPKG_IO_FILEIO |
|
|
207 description " |
|
|
208 This option enables the use of a file system to access the pages |
|
|
209 to be served. It is the responsibility of the user to properly |
|
|
210 mount the file system(s) required by the web server. If this |
|
|
211 option is not selected each URL requested must be serviced using |
|
2265
|
212 either c language callbacks or internal resources." |
|
2250
|
213 } |
|
|
214 |
|
|
215 cdl_option CYGOPT_NET_ATHTTPD_USE_AUTH { |
|
|
216 display "Support for basic authentication" |
|
|
217 flavor bool |
|
|
218 default_value 0 |
|
|
219 description " |
|
2265
|
220 This option enables the use basic authentication in web pages. |
|
2250
|
221 Digest authentication code is also included, but has not been |
|
|
222 extensively tested." |
|
|
223 compile md5c.c |
|
|
224 compile auth.c |
|
|
225 } |
|
|
226 |
|
2326
|
227 cdl_option CYGOPT_NET_ATHTTPD_CLOSE_CHUNKED_CONNECTIONS { |
|
|
228 display "Close connections used for chunked transfers" |
|
|
229 flavor bool |
|
|
230 default_value 1 |
|
|
231 description " |
|
|
232 This option causes connections used for chunked transfer to be |
|
|
233 closed after use. Persisting the connection will use less |
|
|
234 network resources and will improve latency, but may do so at |
|
|
235 the risk of compatibility with older browsers." |
|
|
236 } |
|
|
237 |
|
|
238 cdl_option CYGOPT_NET_ATHTTPD_DOCUMENT_EXPIRATION_TIME { |
|
|
239 display "Maximum lifetime of a document in seconds" |
|
|
240 flavor data |
|
|
241 default_value 0 |
|
|
242 description " |
|
|
243 This options causes documents to 'expire' after a set number |
|
|
244 of seconds. If certain pages are updated frequently, it might be a |
|
|
245 good idea to assign them an expitation time in seconds. If the |
|
|
246 client needs to reload a page that has expired, it will request |
|
|
247 it again, otherwise it will use the copy in the cache. A value |
|
|
248 of 0 means that this option is disabled. Any other value |
|
|
249 represents the number of seconds (after the last modification to |
|
|
250 the document) after which the page becomes stale. This option |
|
|
251 applies to all the pages (including those that reside in ROM |
|
|
252 and thus, by definition, won't change) and thus is it preferable |
|
|
253 to use the CYG_HTTPD_MODE_NO_CACHE mode for pages that need to be |
|
|
254 refreshed frequently." |
|
|
255 } |
|
|
256 |
|
2250
|
257 cdl_option CYGOPT_NET_ATHTTPD_USE_DIRLIST { |
|
|
258 display "Support for directory listing" |
|
|
259 flavor bool |
|
|
260 default_value 0 |
|
|
261 active_if CYGPKG_IO_FILEIO |
|
|
262 active_if CYGOPT_NET_ATHTTPD_USE_FS |
|
|
263 description " |
|
|
264 When a client issues a request that ends in '/' the server will |
|
|
265 try to locate anyone of a number of index files. Failing to find |
|
|
266 one, it will list the directory contents." |
|
|
267 } |
|
|
268 |
|
|
269 cdl_component CYGOPT_NET_ATHTTPD_CGIBIN { |
|
|
270 display "Supported CGI Types" |
|
|
271 flavor none |
|
|
272 no_define |
|
|
273 description "Options to select which CGI types are supported." |
|
|
274 |
|
|
275 cdl_option CYGOPT_NET_ATHTTPD_USE_CGIBIN_OBJLOADER { |
|
2265
|
276 display "Support cgi via the OBJLOADER package" |
|
2250
|
277 flavor bool |
|
|
278 default_value 0 |
|
|
279 active_if CYGPKG_OBJLOADER |
|
|
280 description "This option enables the use of the object loader |
|
|
281 package as a means of providing on-demand loading and |
|
|
282 execution of code, thus providing a simple cgi |
|
|
283 capability that does not involve scripting." |
|
|
284 } |
|
|
285 |
|
|
286 cdl_option CYGOPT_NET_ATHTTPD_USE_CGIBIN_TCL { |
|
2265
|
287 display "Support cgi via the a simple tcl interpreter (jim)" |
|
2250
|
288 flavor bool |
|
|
289 default_value 0 |
|
|
290 description "This option enables the use of a small tcl |
|
|
291 interpreter as a means of providing a simple cgi |
|
|
292 capability. Checking this option increases |
|
|
293 considerably the size of the executable." |
|
2326
|
294 compile jim.c jim-aio.c |
|
2250
|
295 define JIM_ANSIC |
|
2326
|
296 define JIM_STATICEXT |
|
2250
|
297 } |
|
|
298 } |
|
|
299 |
|
|
300 cdl_option CYGOPT_NET_ATHTTPD_DEBUG_LEVEL { |
|
|
301 display "Verbosity of debug output" |
|
|
302 flavor data |
|
|
303 legal_values 0 1 2 |
|
|
304 default_value 0 |
|
|
305 description "This option allows controls over the verbosity of |
|
|
306 the debug output. 1 mostly reports opening and |
|
|
307 closing of socket descriptors, 2 is very |
|
|
308 verbose, including the name of all files sent |
|
|
309 out, including internal resources." |
|
|
310 } |
|
|
311 cdl_component CYGPKG_ATHTTPD_OPTIONS { |
|
|
312 display "AT HTTP server build options" |
|
|
313 flavor none |
|
|
314 no_define |
|
|
315 |
|
|
316 cdl_option CYGPKG_ATHTTPD_CFLAGS_ADD { |
|
|
317 display "Additional compiler flags" |
|
|
318 flavor data |
|
|
319 no_define |
|
|
320 default_value { "-D__ECOS" } |
|
|
321 description " |
|
|
322 This option modifies the set of compiler flags for |
|
|
323 building the HTTP server package. |
|
|
324 These flags are used in addition |
|
|
325 to the set of global flags." |
|
|
326 } |
|
|
327 |
|
|
328 cdl_option CYGPKG_ATHTTPD_CFLAGS_REMOVE { |
|
|
329 display "Suppressed compiler flags" |
|
|
330 flavor data |
|
|
331 no_define |
|
|
332 default_value { "" } |
|
|
333 description " |
|
|
334 This option modifies the set of compiler flags for |
|
|
335 building the HTTP server package. These flags are removed from |
|
|
336 the set of global flags if present." |
|
|
337 } |
|
|
338 } |
|
|
339 } |
|
|
340 |
|
|
341 # ==================================================================== |
|
|
342 # EOF httpd.cdl |