Commits on Sep 19, 2018
Commits on Sep 16, 2018
  1. lws_return_http_status: use /error.css if possible

    lws-team committed Sep 16, 2018
Commits on Sep 12, 2018
  1. http proxy: client: unix socket support

    lws-team committed Sep 4, 2018
    This allows the client stuff to understand that addresses beginning with '+'
    represent unix sockets.
    If the first character after the '+' is '@', it understands that the '@'
    should be read as '\0', in order to use Linux "abstract namespace"
    Further the lws_parse_uri() helper is extended to understand the convention
    that an address starting with + is a unix socket, and treats the socket
    path as delimited by ':', eg
    HTTP Proxy is updated to allow mounts to these unix socket paths.
    Proxy connections go out on h1, but are dynamically translated to h1 or h2
    on the incoming side.
    Proxy usage of libhubbub is separated out... LWS_WITH_HTTP_PROXY is on by
    default, and LWS_WITH_HUBBUB is off by default.
  2. docs: CSP

    lws-team committed Sep 11, 2018
  3. esp32: follow idf meddlings

    lws-team committed Sep 11, 2018
Commits on Sep 11, 2018
  1. plat: ENOTCONN

    lws-team committed Sep 5, 2018
  2. lwsws: logging: use stderr not syslog directly

    lws-team committed Sep 5, 2018
    systemd is completely at home using stderr logging to the journal,
    without needing syslog apis.
  3. threadpool

    lws-team committed Sep 2, 2018
  4. client: libuv: fix close handling during redirect

    lws-team committed Sep 2, 2018
    During client redirect we "reset" the wsi to the redirect address,
    involving closing the current fd that was told to redirect (it will
    usually be a completely different server or port).
    With libuv and its two-stage close that's not trivial.  This solves
    the problem we will "reset" (overwrite) where the handle lives in the
    wsi with new a new connection / handle by having it copied out into
    an allocated watcher struct, which is freed in the uv close callback.
    To confirm it the minimal ws client example gets some new options, the
    original problem was replicated with this
    $ lws-minimal-ws-client-echo -s -p 80
  5. logging: ellipsisize logs longer than our line buffer

    lws-team committed Sep 1, 2018
    Currently the line buffer for vsnprintf() is 256, lines longer than that
    end abruptly without a CRLF.
    Change it to end with "...\n\0" when it truncates the line.
    CSP header additions, logged on vhost init, longer than this are going
    to become normal...
  6. log client IP of well-wishers

    lws-team committed Sep 1, 2018
    Although getting a million of these doesn't make any trouble for lws, the
    source should be logged.
  7. genhmac: expose as VISIBLE

    lws-team committed Aug 29, 2018
  8. Fix Iphlpapi.h -> iphlpapi.h

    katzer authored and lws-team committed Aug 29, 2018
    If you cross compile for Windows you will get an error otherwise that the header cannot be found.
    See here for code example from microsoft:
  9. csp: update lwsgs

    lws-team committed Aug 28, 2018
  10. ws role: use protocol bind and unbind and transition earlier

    lws-team committed Aug 28, 2018
    Now individual role callbacks are added in an earlier patch for protocol
    bind and unbind, change the ws upgrade action to use the generic protocol
    bind and unbind apis so the corresponding callbacks are issued for ws.
  11. CSP: Firefox bans default SVG styles

    lws-team committed Aug 24, 2018
    Firefox has a bug for 2 years
    where a strict content-security-policy that is correctly followed
    wrongly also defeats inline style inside SVG.
    Apply the workaround told by the GIMP guys on the bug to convert
    SVG styles to XML at export.
  12. h2: use vhost headers with tolower adaptation

    lws-team committed Aug 24, 2018
    h2 was not applying vhost headers, make it do so.
    Also adapt any header names to lower-case as required by h2.
  13. unix skt: default on

    lws-team committed Aug 24, 2018
  14. clean: coverity

    lws-team committed Aug 23, 2018
  15. libwebsockets.h: split out into a dir of sub-includes included by lib…

    lws-team committed Aug 23, 2018
    This has no effect on user code or backward compatibility.
    It moves the in-tree public api header libwebsockets.h from ./lib
    to ./include, and introduces a dir ./include/libwebsockets/
    The single public api header is split out into 31 sub-headers
    in ./include/libwebsockets.  ./include/libwebsockets.h contains
    some core types and platform adaptation code, but the rest of it
    is now 31 #include <libwebsockets/...>
    At install time, /usr/[local/]include/libwebsockets.h is installed
    as before, along now with the 31 sub-headers in ...include/libwebsockets/
    There's no net effect on user code.
    But the api header is now much easier to maintain and study, with 31
    topic-based sub headers.
Commits on Sep 2, 2018
  1. http: compression methods

    lws-team committed Sep 2, 2018
    Add generic http compression layer eanbled at cmake with LWS_WITH_HTTP_STREAM_COMPRESSION.
    This is wholly a feature of the HTTP role (used by h1 and h2 roles) and doesn't exist
    outside that context.
    Currently provides 'deflate' and 'br' compression methods for server side only.
    'br' requires also -DLWS_WITH_HTTP_BROTLI=1 at cmake and the brotli libraries (available in
    your distro already) and dev package.
    Other compression methods can be added nicely using an ops struct.
    The built-in file serving stuff will use this is the client says he can handle it, and the
    mimetype of the file either starts with "text/" (html and css etc) or is the mimetype of
    zlib allocates quite a bit while in use, it seems to be around 256KiB per stream.  So this
    is only useful on relatively strong servers with lots of memory.  However for some usecases
    where you are serving a lot of css and js assets, it's a nice help.
    The patch performs special treatment for http/1.1 pipelining, since the compression is
    performed on the fly the compressed content-length is not known until the end.  So for h1
    only, chunked transfer-encoding is automatically added so pipelining can continue of the
    For h2 the chunking is neither supported nor required, so it "just works".
    User code can also request to add a compression transform before the reply headers were
    sent using the new api
    lws_http_compression_apply(struct lws *wsi, const char *name,
    			   unsigned char **p, unsigned char *end, char decomp);
    ... this allows transparent compression of dynamically generated HTTP.  The requested
    compression (eg, "deflate") is only applied if the client headers indicated it was
    supported, otherwise it's a NOP.
    Name may be NULL in which case the first compression method in the internal table at
    stream.c that is mentioned as acceptable by the client will be used.
    NOTE: the compression translation, same as h2 support, relies on the user code using
    LWS_WRITE_HTTP and then LWS_WRITE_HTTP_FINAL on the last part written.  The internal
    lws fileserving code already does this.