Commit graph

74 commits

Author SHA1 Message Date
oliverschmidt b15deeff07 Fixed bug introduced with the 8.3 filesystem support.
If we use .htm instead of .html then we should also check for .htm instead of .html when it comes to MIME type setting.

Interestingly this didn't show up when testing with Internet Explorer as that one just ignores the wrong MIME type and displays the HTML page as expected.

Thanks to Shane Wood for pointing out the issue!
2011-01-25 20:13:41 +00:00
dak664 a026c94467 Fix compiler warnings 2010-12-14 22:45:22 +00:00
adamdunkels 5585d72c86 A simple but substantial change: uIP used the htons()/HTONS() macro
functions for converting between host and network byte order. These
names are the de facto standard names for this functionality because
of the original BSD TCP/IP implementation. But they cause problems for
uIP/Contiki: some platforms define these names themselves (Mac OS,
most notably), causing compilation problems for Contiki on those
platforms.

This commit changes all htons to uip_htons instead. Same goes for
htonl, ntohs, and ntohl. All-caps versions as well.
2010-10-19 18:29:03 +00:00
oliverschmidt a6a2d5de9f Fixed recently introduced minor inconsistency. 2010-09-29 09:35:56 +00:00
oliverschmidt cd24e920b6 Made cfs-based webserver example compatible with 8.3 file systems. 2010-09-28 20:40:52 +00:00
oliverschmidt a5dff5e08a Up to now the root of the webserver filesystem was always the current directory. Now an optional file 'wwwroot.cfg' is read. If present its content is used as prefix in the conversion of http paths to local paths. This prefix may be a relative path as well as an absolute path.
This is especially useful for the cc65-based targets as it ain't possible there to "just change into the wwwroot directory and start the webserver using its pathname".
2010-08-30 19:44:38 +00:00
oliverschmidt eebbd2694c Set the maximum number of concurrent web server connections by default to the maximum number of concurrent TCP connections. 2010-04-11 20:54:39 +00:00
oliverschmidt 85082693c5 Added final newline to make GCC happy. 2010-04-11 20:16:56 +00:00
oliverschmidt f22b0dffb3 Made CFS web server pathname length configurable via WEBSERVER_CONF_CFS_PATHLEN and increased default pathname length from 20 to 80 chars in order to allow to actually make use of subdirs. 2010-04-11 20:10:12 +00:00
oliverschmidt eae42d02d5 Added optional URL filtering code to the CFS web server contributed by Kajtar Zsolt (and activated it by default). 2010-04-11 19:18:47 +00:00
oliverschmidt 62e6882946 Include slash in CFS web server state field 'filename' (like in the non-CFS web server). 2010-04-11 15:19:34 +00:00
oliverschmidt 157a95ef19 Reduced code size by removing one PT_WAIT_THREAD call site. 2010-04-11 12:29:07 +00:00
oliverschmidt 48f7992a48 Minor syntax simplification. 2010-04-06 20:41:42 +00:00
oliverschmidt 5a3eb98937 Log requests in PETSCII on CBMs in the non-CFS web server (as was already done in the CFS web server). 2010-04-06 20:35:40 +00:00
oliverschmidt 186ab03dd2 Search for last '.' just like in send_headers(). 2010-04-06 20:16:25 +00:00
oliverschmidt 37d5c753c0 Copy '/404.html' to filename in order to allow send_headers() to send the proper content type. 2010-04-06 20:10:45 +00:00
oliverschmidt d1c4b4968c Added GIF support to the CFS web server (which was already present in the non-CFS web server). 2010-04-06 12:11:41 +00:00
oliverschmidt 69b0727a6d There are no query strings or alike in the CFS web server so the file extensions have to be the actual end of the requested filename. 2010-04-06 12:03:18 +00:00
oliverschmidt 5c75b89ef7 Reduced code size by reducing the SEND_STRING call sites. 2010-04-06 11:49:47 +00:00
oliverschmidt 2a6f169e46 - Added yet another PETSCII->ASCII conversion, this time for the file name in case of a 404.
- Use all lowercase for the 404 message to avoid another PETSCII->ASCII conversion.
- Write logfile entries for all 404s.
- Adjust memory buffers on the C128 to accomodate for the items above.
2010-02-03 23:19:39 +00:00
adamdunkels 815468b442 Added missing argument to send_string() 2010-02-03 21:06:51 +00:00
adamdunkels 6fc0c73bac Reverted the recent addition of the directory listing: instead, a 404 is now sent to indicate that a notfound.html file is missing 2010-02-03 20:41:16 +00:00
adamdunkels e029cf489e When a file was not found, and no notfound.html was found, send directory contents instead 2010-02-02 18:17:55 +00:00
adamdunkels 4938df5c05 Update to Contiki version number 2.4 2010-01-29 18:03:55 +00:00
dak664 0798c56899 Print ipv6 address in weblog and tcp_stats cgi 2009-08-12 18:23:37 +00:00
dak664 8d9f8e3a17 ipv6 address logging 2009-08-11 16:07:54 +00:00
fros4943 51006b3f8d webserver bugfix, caused nightly wget test to fail:
* too many timer_reset will naively increase the start-time, even though timer has not expired. use timer_restart instead
2009-02-09 13:04:37 +00:00
adamdunkels 80c71c9f03 Updated version number in server and user agent strings 2008-11-09 12:27:58 +00:00
adamdunkels 28d52894a0 Reverted raven changes, which are now in the raven-webserver directory 2008-10-14 11:07:57 +00:00
julienabeille 3f394fe927 applications updates for uIPv6 2008-10-14 09:40:11 +00:00
adamdunkels 8906441004 Changed all sprintf() calls to snprintf() to make it useful for systems with very low buffer size 2008-02-24 20:59:51 +00:00
oliverschmidt f5e7da082c Replaced '404.html' with 'notfound.html' as '404.html' is no valid filename for the Apple2 disk operating system ProDOS 8. 2008-02-21 09:25:54 +00:00
oliverschmidt f74e918f00 Adjusted process display cgi to recent change in process states. 2008-02-17 13:59:22 +00:00
oliverschmidt 614fa668cd Removed SELFSTART_PROCESS as AUTOSTART_ENABLE generally serves that purpose - and AUTOSTART_ENABLE gets already set as required :-) 2008-02-08 22:48:28 +00:00
oliverschmidt 0a8f384a40 Allow to optionally (triggered with SELFSTART_PROCESS) self start the application. 2008-02-07 16:28:11 +00:00
oliverschmidt b1e1f07f64 Yet another PETSCII<->ASCII issue solved - this time it caused failure to send the right content type. 2007-12-09 23:35:03 +00:00
oliverschmidt d2d85b4303 Avoid file handle leaks. 2007-12-01 21:27:48 +00:00
oliverschmidt 632240da25 Avoid memory block leaks (and minor code style adjustment). 2007-11-27 23:36:07 +00:00
oliverschmidt 74a6ee69e6 Allow to configure the maximum number of simultaneous connections to the cfs webserver. 2007-11-26 21:50:46 +00:00
oliverschmidt 2a98ace477 Allow to configure the maximum number of simultaneous connections to the cgi webserver. 2007-11-26 21:36:35 +00:00
oliverschmidt ac55fb90e7 Added PETSCII support. 2007-11-26 20:53:00 +00:00
oliverschmidt 7acad03398 Optimzed PETSCII support. 2007-11-25 23:31:11 +00:00
oliverschmidt ace9a6f5fa Optimzed PETSCII support. 2007-11-25 18:39:06 +00:00
oliverschmidt 150fe09d4e Allow to find the scripts on PETSCII machines. 2007-11-25 17:13:56 +00:00
oliverschmidt 4059cd22ce Include 'Referer:' in referer log message. 2007-11-24 13:16:30 +00:00
oliverschmidt 54b8d7ec82 Increased number of simultanious connections from two to three, fixed / streamlined 404.html handling and added logging on tcp resets. 2007-11-22 11:25:08 +00:00
oliverschmidt 764b2738be Removed compiler warnings. 2007-11-18 02:54:45 +00:00
oliverschmidt 38decb056f Removed compiler warning. 2007-11-17 21:12:44 +00:00
oliverschmidt f30a4960c8 Removed compiler warnings. 2007-11-17 20:52:07 +00:00
oliverschmidt 4c6b5b9c17 Removed compiler warnings. 2007-11-17 20:44:07 +00:00