[Olsr-dev] [PATCH v1 00/18] Add '/http' and '/plain' prefixes to info plugins

Ferry Huberts (spam-protected)
Sat Dec 10 18:25:10 CET 2016


From: Ferry Huberts <(spam-protected)>

All info plugins support a number of request prefixes:
- /http : forces output WITH    http headers, temporarily overriding the
          configured "httpheaders" value.
- /plain: forces output WITHOUT http headers, temporarily overriding the
          configured "httpheaders" value.

These prefixes have to be at the start of the request string, can occur
only there, and can occur only once.

Note that this will NOT work when there is an internal error (only occurs
when the connection is not ready to be read, which is very unlikely).


Beside adding these prefixes there are other fixes as well, see patches
1, 2, 3, 4 for the more relevant ones.

Ferry Huberts (18):
  info: ensure the request is initially empty
  info: rework HTTP request detection and request sanitation
  info: send everything on empty requests
  info: drain the request when there are too many requests in flight
  info: trivial comment fix
  info: trival debug output fix
  info: improve readability of the 'empty request' check
  info: protect stripEOLs against invalid input and zero length
  info: protect skipLeadingWhitespace against invalid input and zero
    length
  info: protect skipMultipleSlashes against invalid input and zero
    length
  info: protect stripTrailingSlashes against invalid input and zero
    length
  info: protect cutAtFirstEOL against invalid input and zero length
  info: rename stripEOLs to stripTrailingWhitespace
  info: be explicit about adding headers
  info: fix a comment and add a comment
  info: read the request as early as possible
  info: sanitise the request right after it's been received
  info: introduce command prefixes '/http' and '/plain'

 lib/info/README_INFO  |  17 ++++
 lib/info/info_types.h |   6 ++
 lib/info/olsrd_info.c | 265 ++++++++++++++++++++++++++++++++------------------
 3 files changed, 193 insertions(+), 95 deletions(-)

-- 
2.9.3




More information about the Olsr-dev mailing list