Commits on Jun 6, 2012
Commits on Jun 4, 2012
  1. use request content type for SOAP responses

    vinoski committed Jun 4, 2012
    Rather than hard-coding text/xml or application/xml as the content type for
    SOAP responses, extract the content type from the SOAP request and use it
    in the response. This will avoid problems with clients that don't properly
    handle certain MIME types with SOAP.
Commits on Jun 2, 2012
  1. fix websockets reply status codes for client close messages

    vinoski committed Jun 2, 2012
    A number of autobahn WebSockets tests were failing due to replies
    containing incorrect status codes. Check client status codes and reply with
    correct codes.
  2. refactor yaws_websockets as a gen_server

    vinoski committed Jun 1, 2012
    The yaws_websockets module used an explicit recursive loop. Refactor it to
    use a gen_server instead.
Commits on Jun 1, 2012
  1. assert return value of filelib:ensure_dir for $HOME/yaws dir

    vinoski committed Jun 1, 2012
    A user reported an installation-related error because of a missing
    $HOME/.yaws dir where the CTL file is stored. Assert that
    filelib:ensure_dir returns ok for that directory.
  2. revert SOAP response MIME type to "text/xml"

    vinoski committed Jun 1, 2012
    Some Microsoft tools don't handle "application/xml" as the MIME type for
    SOAP responses. Revert the change from "text/xml" made in commit 15454bc.
    Also perform some minor cleanup in yaws_soap_lib and yaws_soap12_lib.
Commits on May 31, 2012
  1. use already-downloaded ibrowse for tests if network down

    vinoski committed May 31, 2012
    "make test" failed for disconnected operation due to trying to check the
    latest version of ibrowse, which we use for a test client. Change it to
    just use any existing ibrowse if it can't check github for the ibrowse
Commits on May 26, 2012
  1. Merge pull request #107 from nicad/master

    vinoski committed May 26, 2012
    typo in WWW-Authenticate handling leading to infinite recursion
Commits on May 12, 2012
  1. add new HTTP status codes from RFC 6585

    vinoski committed May 12, 2012
    RFC 6585 added new HTTP status codes, so add them here.
    Also change the code that limits the number of incoming headers to return
    new status code 431 (Request Header Fields Too Large).
Commits on May 11, 2012
  1. Add support for precompressed static files

    capflam committed May 11, 2012
    By setting use_gzip_static to true in deflate options, in a vhost
    configuration, It is possible to serve precompressed versions of
    static files. Yaws will look for precompressed files in the same
    location as original files that end in ".gz".
    Only files that do not fit in the cache are concerned and the mtime
    of a precompressed file must be higher than the one of original file.
  2. Fix compat_send/3 to return the number of bytes sent

    capflam committed May 11, 2012
    So all versions of the send function into yaws_sendfile will return
    {ok, BytesSent} if successful, otherwise {error, Reason}.
  3. Improve how the responses compression is handled

    capflam committed May 11, 2012
    Among other things, we can now disable the compression in yaws scripts by
    returning '{header, {content_encoding, "identity"}}'.
    A bug was also fixed when part of a large file is requested. The response
    content length was calculated using the file size and not the part size.
Commits on May 7, 2012
Commits on May 6, 2012
  1. fix issue #106: commit 6b5266 broke websockets

    vinoski committed May 6, 2012
    The fix for uncaught exceptions as implemented in commit 6b5266
    unfortunately included too much within a try/catch block and ended up
    reporting intentional exit(normal) code in websockets as uncaught
    exceptions. Rework the try/catch to protect only the call needing
Commits on May 5, 2012
Commits on May 4, 2012
  1. report uncaught exception as server error 500

    vinoski committed May 4, 2012
    In yaws_server we used to catch exceptions thrown by application code and
    ignore them. Now, catch them and report a 500 error back to the client, and
    include an error message similar to what occurs for unexpected exits in
    application code. This makes debugging applications that unexpectedly throw
    exceptions much easier. Thanks to Richard Carlsson and Samuel Rivas for
    reporting this.
Commits on May 3, 2012
  1. Move hostname resolution from yaws_server to yaws_log

    capflam committed May 3, 2012
    It is useful to keep ip addresses unchanged when a specific logger is
  2. Make the parameter "x_forwarded_for_log_proxy_whitelist" obsolete

    capflam committed May 3, 2012
    This parameter is now ignored and throws a warning when yaws starts.
    If necessary, it can be replaced by a simple logger_mod on top of
    yaws_log. To explain how to write such module, an example was added
    into the www directory (www/logger_mod.yaws).
  3. Remove safe_decode_path/1 from yaws_log and use...

    capflam committed May 3, 2012
    ... yaws_server:safe_decode_path/1 instead.
  4. Complete yaws:setup_gconf/2 and yaws:setup_sconf/3

    capflam committed May 2, 2012
    In embedded mode, these functions are used to populate #gconf and #sconf
    records. Now, all fields can be setup.
Commits on May 2, 2012
  1. doc update

    klacke committed May 2, 2012
Commits on May 1, 2012
Commits on Apr 27, 2012
  1. Fix bugs in yaws_api:parse_multipart_post/1,2 for chunked requests

    capflam committed Apr 27, 2012
    For chunked requests, when several parts are parsed, only the first one was
    processed properly. For the others, all the content of each part was needed
    to be parsed. So when an huge file was uploaded, this bug could lead to a
    memory exhaustion.
    Note: Now, yaws_api:parse_multipart_post/1,2 can return '{error, Reason}'
    if an error occurred during the parsing.
Commits on Apr 26, 2012
  1. Check the Content-Length before reading the request's content

    capflam committed Apr 26, 2012
    Some browsers, like Firefox, do not support files that are larger than 2GB.
    Uploading a >2GB file causes an integer overflow and the Content-Length
    header is set to a negative value.
    To prevent any crash in this case, we check the Content-Length value before
    reading the request's content. When the value is negative, an error 400 is
    A bug about this problem is openned for Firefox:
Commits on Apr 25, 2012
  1. Add options to configure deflate compression behaviour

    capflam committed Apr 25, 2012
    By adding "<deflate> ... </deflate>" structure in vhosts configuration,
    it is possible to configure how deflate compression will be applied
    and when it will come into effect. Now we can:
     * define the smallest response size that will be compressed
     * define the compression level to be used
     * specify the zlib compression window size
     * specify how much memory should be allocated for the internal
       compression state
     * choose the strategy used to tune the compression algorithm
    All these parameters are used when a zlib stream is initialized for
    It is also possible to define all compressible mime types.
    Here is an example:
    <server localhost>
      deflate = true
        min_compress_size = 4096
        compression_level = best_compression
        mime_types        = defaults, image/*
        mime_types        = application/xml, application/xhtml+xml, application/rss+xml
        mem_level         = 9
        strategy          = default
        window_size       = 15
  2. Update yaws.tex to have the same description of the config file...

    capflam committed Apr 24, 2012
    ...than in the manpage yaws.conf.5
  3. Make the target test dependent on the target all

    capflam committed Apr 24, 2012
    So, when we run 'make test', Yaws sources are recompiled, if needed.
  4. make handling of cookie names case insensitive

    vinoski committed Apr 25, 2012
    According to RFC 2109, handling of cookie names is specified as being case
    Also, add a couple cookie unit tests. More are needed though.
Commits on Apr 24, 2012
  1. add rebar dependencies needed for SOAP applications

    vinoski committed Apr 24, 2012
    Use rebar.config.script to dynamically add SOAP dependencies if the shell
    environment variable YAWS_SOAP is set. This way, Yaws users not interested
    in SOAP do not need these dependencies.
  2. change dialyzer Makefile targets to handle known warnings

    vinoski committed Apr 24, 2012
    At the suggestion of Tuncer Ayaz, modify the dialyzer targets to use the
    new known_dialyzer_warnings file to ignore all known dialyzer warnings.
Commits on Apr 22, 2012