1 # ====================================================================
5 # HTTP server configuration data
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2005 eCosCentric Ltd.
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.
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
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.
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.
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.
36 ## -------------------------------------------
37 #####ECOSGPLCOPYRIGHTEND####
38 # ====================================================================
39 ######DESCRIPTIONBEGIN####
41 # Author(s): Anthony Tonizzo (atonizzo@gmail.com)
42 # Contributors: Lars Povlsen (lpovlsen@vitesse.com)
45 #####DESCRIPTIONEND####
47 # ====================================================================
49 cdl_package CYGPKG_ATHTTPD {
50 display "Another Tiny HTTP server"
51 description "This package provides a small footprint web server for eCos
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
57 requires CYGPKG_NET_STACK_INET
58 requires !CYGPKG_HTTPD
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
69 # ====================================================================
71 cdl_component CYGPKG_NET_ATHTTPD_THREADOPT {
72 display "Thread settings"
75 description "Options to change certain thread values."
77 cdl_option CYGNUM_NET_ATHTTPD_THREADOPT_PRIORITY {
78 display "Thread priority"
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
83 priority. The exact priority depends on the
84 importance of the server relative to the rest
85 of the system. The default is to put it in the
86 middle of the priority range to provide
87 reasonable response without impacting genuine
88 high priority threads."
91 cdl_option CYGNUM_NET_ATHTTPD_THREADOPT_STACKSIZE {
92 display "Thread stack size"
95 description "This is the amount of extra stack to be
96 allocated for the HTTPD thread. This value is
97 added to CYGNUM_HAL_STACK_SIZE_MINIMUM to
98 determine the final size of the stack for the
103 cdl_component CYGOPT_NET_ATHTTPD_SERVEROPT {
104 display "Server settings"
107 description "Options to change certain server options."
109 cdl_option CYGNUM_NET_ATHTTPD_SERVEROPT_PORT {
110 display "Server Port"
113 description "This is the port on which the server will be listening
114 for requests. Unless overridden in the request by the
115 client, the well known port for HTTP is 80."
118 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_SERVERID {
119 display "Server ID string"
121 default_value {"\"eCos Embedded Web Server\""}
122 description "This is the string sent out in the 'Server:'
126 cdl_option CYGNUM_ATHTTPD_SERVER_BUFFER_SIZE {
127 display "IO buffer size"
130 description "This option defines the size of the buffers used to
131 receive and transmit transmit data to and from the
135 cdl_option CYGNUM_ATHTTPD_SERVER_MAX_POST {
136 display "Maximum data received upon POST"
139 description "This option defines the size of maximum amount of data
140 the web server will accept from POST'ed forms."
143 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_ROOTDIR {
144 display "HTTPD root directory"
146 default_value {"\"/\""}
147 description "This is the absolute path in the eCos file
148 system to the HTML documents, including cgi-bin
149 files and error files and it is generally where
150 the web server will look for the index
151 file. Include a trailing slash."
154 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_CGIDIR {
155 display "cgi-bin directory"
156 active_if { 0 != CYGOPT_NET_ATHTTPD_USE_CGIBIN_OBJLOADER ||
157 0 != CYGOPT_NET_ATHTTPD_USE_CGIBIN_TCL }
159 default_value {"\"cgi-bin/\""}
160 description "This is the path, relative to
161 CYGDAT_NET_ATHTTPD_SERVEROPT_ROOTDIR, where the
162 cgi-bin files are stored. Based on the
163 extension of the cgi-bin file requested, the
164 appropriate interpreter will be used. Include a
168 cdl_option CYGDAT_NET_ATHTTPD_SERVEROPT_ERRORDIR {
169 display "Error files directory"
171 default_value {"\"errors/\""}
172 description "This is the path, relative to the
173 CYGDAT_NET_ATHTTPD_SERVEROPT_ROOTDIR, that
174 contains the user-defined files that are sent
175 out by the server in case of error. The files
176 are named error_XXX.html where XXX is the 3
177 digit HTML code. For example, for a 404 error
178 the server file will be named
179 error_404.html. Upon a 404 error, the server
180 will check the existence of such a file in this
181 directory and if found, it will send it
182 out. Missing that file, a standard simple
183 message will be sent instead. Include a
187 cdl_option CYGDAT_NET_ATHTTPD_DEFAULT_MIME_TYPE {
188 display "Default MIME type"
190 default_value {"\"text/plain\""}
191 description "When accessing internal resources or a file
192 system, the MIME type is determined by first
193 finding the extension of the file itself and
194 then by looking up the extension in the MIME
195 table. In case no extension is found the user
196 can define the default MIME type to use. Notice
197 that this is the full MIME type and not the
198 extension. A list of standard MIME types
199 sorted by extension can be found in the
200 current/doc directory"
203 cdl_option CYGDAT_NET_ATHTTPD_ALTERNATE_HOME {
204 display "User defined Home Page"
206 default_value {"\"/index.html\""}
207 description "This file name defines the name of a custom index file
208 and is used in case none of the default index files are
209 found in a directory. Notice that this file name is
210 only appended to GET requests for \"/\""
214 cdl_option CYGOPT_NET_ATHTTPD_USE_FS {
215 display "Support for file system access"
218 active_if CYGPKG_IO_FILEIO
220 This option enables the use of a file system to access the pages
221 to be served. It is the responsibility of the user to properly
222 mount the file system(s) required by the web server. If this
223 option is not selected each URL requested must be serviced using
224 either c language callbacks or internal resources."
227 cdl_option CYGOPT_NET_ATHTTPD_USE_AUTH {
228 display "Support for basic and digest authentication"
232 This option enables the use basic authentication in web pages.
233 Not all clients have been tested."
238 cdl_option CYGOPT_NET_ATHTTPD_CLOSE_CHUNKED_CONNECTIONS {
239 display "Close connections used for chunked transfers"
243 This option causes connections used for chunked transfer
244 to be closed after use. Persisting the connection will use
245 less network resources and will improve latency, but may
246 do so at the risk of compatibility with older browsers."
249 cdl_option CYGOPT_NET_ATHTTPD_DOCUMENT_EXPIRATION_TIME {
250 display "Maximum lifetime of a document in seconds"
254 This options causes documents to 'expire' after a set number
255 of seconds. If certain pages are updated frequently, it might be a
256 good idea to assign them an expitation time in seconds. If the
257 client needs to reload a page that has expired, it will request
258 it again, otherwise it will use the copy in the cache. A value
259 of 0 means that this option is disabled. Any other value
260 represents the number of seconds (after the last modification to
261 the document) after which the page becomes stale. This option
262 applies to all the pages (including those that reside in ROM
263 and thus, by definition, won't change) and thus is it preferable
264 to use the CYG_HTTPD_MODE_NO_CACHE mode for pages that need to be
265 refreshed frequently."
268 cdl_option CYGOPT_NET_ATHTTPD_USE_DIRLIST {
269 display "Support for directory listing"
272 active_if CYGPKG_IO_FILEIO
273 active_if CYGOPT_NET_ATHTTPD_USE_FS
275 When a client issues a request that ends in '/' the server will
276 try to locate anyone of a number of index files. Failing to find
277 one, it will list the directory contents."
280 cdl_component CYGOPT_NET_ATHTTPD_CGIBIN {
281 display "Supported CGI Types"
284 description "Options to select which CGI types are supported."
286 cdl_option CYGOPT_NET_ATHTTPD_USE_CGIBIN_OBJLOADER {
287 display "Support cgi via the OBJLOADER package"
290 active_if CYGPKG_OBJLOADER
291 description "This option enables the use of the object loader
292 package as a means of providing on-demand loading and
293 execution of code, thus providing a simple cgi
294 capability that does not involve scripting."
297 cdl_option CYGOPT_NET_ATHTTPD_USE_CGIBIN_TCL {
298 display "Support cgi via the a simple tcl interpreter (jim)"
301 description "This option enables the use of a small tcl
302 interpreter as a means of providing a simple cgi
303 capability. Checking this option increases
304 considerably the size of the executable."
305 compile jim.c jim-aio.c
311 cdl_option CYGOPT_NET_ATHTTPD_DEBUG_LEVEL {
312 display "Verbosity of debug output"
316 description "This option allows controls over the verbosity of
317 the debug output. 1 mostly reports opening and
318 closing of socket descriptors, 2 is very
319 verbose, including the name of all files sent
320 out, including internal resources."
322 cdl_component CYGPKG_ATHTTPD_OPTIONS {
323 display "AT HTTP server build options"
327 cdl_option CYGPKG_ATHTTPD_CFLAGS_ADD {
328 display "Additional compiler flags"
331 default_value { "-D__ECOS" }
333 This option modifies the set of compiler flags for
334 building the HTTP server package.
335 These flags are used in addition
336 to the set of global flags."
339 cdl_option CYGPKG_ATHTTPD_CFLAGS_REMOVE {
340 display "Suppressed compiler flags"
345 This option modifies the set of compiler flags for
346 building the HTTP server package. These flags are removed from
347 the set of global flags if present."
352 # ====================================================================