Commit Graph

30 Commits

Author SHA1 Message Date
Chris Johns
522db76a96 cpukit/mghttpd: Support all descriptors in select
- Support all possible descriptors in a select call. Borrowed
  from Christain and his mDNS change in LibBSD

- If select (or poll) fails pause for a bit rather than
  locking up in a hard loop
2021-08-19 08:51:39 +10:00
Frank Kühndel
c8c1426c68 mghttpd/mongoose: Fix string truncation warning
This fixes the compiler warning below.

../../../cpukit/mghttpd/mongoose.c:1919:45: warning:
'.gz' directive output may be truncated writing 3 bytes into a region
of size between 1 and 255 [-Wformat-truncation=]
2020-10-10 15:05:41 +02:00
Sebastian Huber
80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Sebastian Huber
028b0ced4c build: Merge mghttpd/Makefile.am 2018-10-10 07:54:43 +02:00
Sebastian Huber
68e1ccc46d build: Remove specialized CPPFLAGS 2018-10-09 13:26:47 +02:00
Sebastian Huber
2e77151e93 mghttpd: Add configuration to source file
Update #3375.
2018-10-04 08:02:28 +02:00
Chris Johns
d13a62409e cpukit/mttpd: Add a callback to generate a per file HTTP etag
Close #3323.
2018-04-11 12:47:01 +10:00
Chris Johns
2afb22b7e1 Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step.  It
copied header files from arbitrary locations into the build tree.  The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

* The make preinstall step itself needs time and disk space.

* Errors in header files show up in the build tree copy.  This makes it
  hard for editors to open the right file to fix the error.

* There is no clear relationship between source and build tree header
  files.  This makes an audit of the build process difficult.

* The visibility of all header files in the build tree makes it
  difficult to enforce API barriers.  For example it is discouraged to
  use BSP-specifics in the cpukit.

* An introduction of a new build system is difficult.

* Include paths specified by the -B option are system headers.  This
  may suppress warnings.

* The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step.   All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc.  Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

* cpukit/include

* cpukit/score/cpu/@RTEMS_CPU@/include

* cpukit/libnetworking

The new BSP include directories are:

* bsps/include

* bsps/@RTEMS_CPU@/include

* bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed.  The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.
2018-01-25 08:45:26 +01:00
Sebastian Huber
9589755f77 mghttpd: Include <mghttpd/mongoose.h>
Prepare for header file move to common include directory.

Update #3254.
2017-12-13 09:04:28 +01:00
Sebastian Huber
506bfc8580 Move printer initialization to separate header
The RTEMS print user need to know nothing about a particular printer
implementation.  In particular get rid of the <stdio.h> include which
would be visible via <rtems.h>.
2016-06-22 07:29:26 +02:00
Sebastian Huber
214156d98c mghttpd: Add RTEMS printer support 2016-06-06 12:57:07 +02:00
Nick Withers
f42d4292cb Enable WebSocket support in the Mongoose HTTP server 2014-12-15 07:44:56 +01:00
Joel Sherrill
b597c0d60c Regenerate all preinstall.am files.
Apparently, at some point automake output changed and these were
not updated.
2014-08-28 08:44:52 -05:00
Nick Withers
b5d2d4a61c Update to Mongoose 3.9 at the last point before the MIT -> GPL license change
[That is, 04fc209644. See https://groups.google.com/forum/#!topic/mongoose-users/aafbOnHonkI]

The RTEMS patches described in the following emails and made to the previous Mongoose base have been applied:
  - http://www.rtems.org/pipermail/rtems-devel/2012-July/001345.html
  - http://www.rtems.org/pipermail/rtems-devel/2012-July/001343.html
  - http://www.rtems.org/pipermail/rtems-devel/2012-July/001346.html (except to mongoose.1, see below)
...as well as a patch very similar to that discussed at http://forums.bannister.org/ubbthreads.php?ubb=showflat&topic=7600&gonew=1 to provide poll() (which might be able to go away soon, with incoming RTEMS poll() support)

mg_connect(), mg_url_encode() and mg_vprintf() were additionally marked "static" to silence warnings.

mongoose.1 appears to have been removed from the upstream distribution.

Note that the API's changed, for example:
  - A struct mg_callbacks must now be provided to mg_start(). Initialise members to NULL to disable various types of callbacks
  - Callback interfaces have changed significantly in general
  - The short form of options (e.g., "u" instead of "run_as_user") are no longer available (upstream)
  - The "max_request_size" options has been removed
2013-12-04 10:09:16 +01:00
Joel Sherrill
cb7b57e174 mghttpd: Requires POSIX to build server and tests
Formerly, mghttpd was conditional only on networking being
enabled. It uses on pthread and must also be conditional
on POSIX threads support being enabled.
2012-10-03 11:09:32 -05:00
Christian Mauderer
5267241b32 mghttpd: Clarify comment 2012-07-12 09:51:44 +02:00
Christian Mauderer
54da7c3e55 mghttpd: Add stack size and scheduling options 2012-07-12 09:51:44 +02:00
Sebastian Huber
ea008e2d0d mghttpd: Use MD5 library 2012-07-12 09:51:44 +02:00
Sebastian Huber
4248b28296 mghttpd: Use HAVE_CONFIG_H 2012-07-12 09:51:44 +02:00
Christian Mauderer
ad6c1f1138 mghttpd: Update Mongoose
Update to Mongoose Mercurial revision 268:38a02c8a6744 available at:

https://code.google.com/p/mongoose/
2012-07-12 09:51:44 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Joel Sherrill
61250b4ce9 Remove all .cvsignore files. 2012-02-01 10:59:44 -06:00
Ralf Corsepius
b9636c24ca Whitespace removal. 2009-12-10 03:14:16 +00:00
Joel Sherrill
3f255ce131 2009-11-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* mghttpd/mongoose.c: crypto_sw table is not used when SSL is disabled.
	RTEMS does not have flockfile/funlockfile.
2009-11-23 14:33:23 +00:00
Ralf Corsepius
3202cd8ca1 Various 16bit fixes. 2009-11-17 17:30:41 +00:00
Ralf Corsepius
56f9698239 Add HAVE_CONFIG_H. 2009-11-17 17:15:08 +00:00
Ralf Corsepius
ce841ab57c Add HAVE_SYS_MMAN_H HAVE_DLFCN_H. 2009-11-17 17:02:08 +00:00
Ralf Corsepius
dd1569b1b3 Convert to unix encoding. 2009-11-17 16:58:36 +00:00
Ralf Corsepius
390631d322 New. 2009-11-17 16:55:52 +00:00
Ralf Corsepius
b45febaa2c 2009-11-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* mghttpd/mongoose.c, mghttpd/mongoose.h, mghttpd/mongoose.1:
	Import from svn http://mongoose.googlecode.com/svn/trunk (r477).
2009-11-17 16:53:48 +00:00