Skip to content
Commits on Jul 11, 2012
  1. @capflam

    Add index_files directive into the server part configuration

    capflam committed Jul 11, 2012
    This directive sets the list of resources to look for, when a directory is
    requested by the client. If the last entry begins with a "/", and none of
    the earlier resources are found, Yaws will perform a redirect to this uri.
    Default is:
      index_files = index.yaws index.html index.php
Commits on Jul 10, 2012
  1. @vinoski

    wrap SSL sockets in tuple

    vinoski committed Apr 20, 2012
    Yaws previously internally used details of an SSL socket representation
    that's supposed to be private/opaque to Erlang's SSL support. Encapsulate
    SSL sockets within a {ssl, SslSocket} tuple and add the
    yaws_api:get_sslsocket/1 function that returns a socket for SSL sockets or
    undefined for non-SSL sockets. Also document the new get_sslsocket/1
    function and other minor tweaks to SSL areas of the documentation.
  2. @capflam

    Refactor Set-Cookie/Cookie header parsing to follow RFC6265

    capflam committed Jul 9, 2012
    RFC6265 obsoletes RFC2965 and RFC2109. #setcookie{} and #cookie{} are
    changed to reflect this new RFC. So, yaws_api:parse_set_cookie/1 and
    yaws_api:parse_cookie/1 are refactored accordingly:
    * yaws_api:parse_set_cookie/1: Because RFC2109 and RFC2965 are still used,
      we try to be backward compatible with these old RFCs. So this function
      returns a #setcookie{} record when only one cookie is found else it returns
      a list of #setcookie{} records.
      in RFC2109 and RFC2965, cookies are separated by comma. So, comma is
      forbidden in 'path-av' and 'extension-av' except for double-quoted value.
      The parsing are not really strict because of the compatibility and can lead
      to unwanted behaviors.
      Old attributes (like 'Comment' or 'Port') are still parsed and can be
      found into #setcookie.extensions field.
    * yaws_api:parse_cookie/1: This function follows the RFC6265, so all cookie
      attributes (like '$Domain' or '$Path') are parsed like any other cookie.
Commits on Jul 4, 2012
  1. @capflam

    Fix parse_set_cookie/1 and format_set_cookie/1 functions

    capflam committed Jul 4, 2012
    1. According to the RFCs 2109 and 2965, multiple cookies can be set in a
    single 'Set-Cookie' header. So, yaws_api:parse_set_cookie/1 now returns a
    list of #setcookie{} records. If no cookie was found or if an error occurred,
    it returns []. The parsing is also improved.
    Note that this fix breaks the compatibility with previous versions.
    2. In yaws_api:format_set_cookie/1, options are now always formated as
    3. 2 new functions are added, yaws_api:parse_cookie/1 and
    yaws_api:format_cookie/1, to parse and format 'Cookie' headers. To let these
    functions to work, the #cookie{} record was introduced.
    Documentation and testsuite are updated accordingly.
Commits on Jun 27, 2012
  1. @vinoski

    add doc for new functions for manipulating #headers{} records

    vinoski committed Jun 27, 2012
    Commit cccc578 added new functions to yaws_api for manipulating #headers
    records: set_header/2, set_header/3, get_header/2, and
    delete_header/2. This commit adds the documentation.
Commits on Jun 21, 2012
  1. @vinoski

    add reverse proxy intercept module capability

    vinoski committed Jun 17, 2012
    Users can now specify an interception module that can rewrite requests and
    responses as they pass through the Yaws reverse proxy. See the
    documentation for details (yaws.conf.5 man page or the yaws.pdf file).
    Also add new set_header, get_header, and delete_header functions to the
    yaws_api module to allow intercept modules and arg rewriters to more easily
    examine and modify #headers{} records.
    Add new tests for the new header manipulation functions and for the reverse
    proxy interception feature.
Commits on May 11, 2012
  1. @capflam

    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.
Commits on May 3, 2012
  1. @capflam

    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).
Commits on Apr 27, 2012
  1. @capflam

    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 25, 2012
  1. @capflam

    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. @capflam
Commits on Feb 21, 2012
  1. @capflam

    Manage all 'special' headers of #headers{} and #outh{} records

    capflam committed Feb 21, 2012
    Some headers, like 'Content-Encoding' or 'Transfer-Encoding' were
    not correctly handled. These changes can be useful for everyone who
    writes yaws scripts or appmods. In particular, the next version of
    the reverse proxy depends on it.
Commits on Feb 15, 2012
  1. @capflam

    Fix issue #88

    capflam committed Feb 15, 2012
    2 changes here:
     * Revert "Flush remaining data when dynamic content is delivered"
    This reverts commit d09ed3d.
    Systematically flushing data is not a good idea.
     * Add "flush" as possible return value of the out/1 function
    Some clients (eg. Firefox and google-chome...) do not handle connection
    close gracefully when the connection is closed during sending data; they
    do not read the server response. So, when the response is important, to
    warn the end-user that an error occured for example, we must be fair by
    flushing data before closing the connection.
Commits on Feb 2, 2012
  1. @capflam

    Allow the server signature to be defined per virtual server

    capflam committed Feb 2, 2012
    Now, we can use the 'server_signature' directive into the server part
    to overload the global one for specific virtual server.
Commits on Jan 18, 2012
  1. @sgolovan @vinoski

    fix syntax and spelling errors in man pages

    sgolovan committed with vinoski Jan 16, 2012
    In man/yaws.conf.5, man/yaws_api.5: Fixed a few syntax and spelling
    errors in manpages.
Commits on Jan 9, 2012
  1. Merge remote-tracking branch 'capflam/trace_improvements'

    committed Jan 9, 2012
Commits on Jan 6, 2012
  1. @capflam
  2. @capflam
  3. @capflam
Commits on Dec 25, 2011
  1. exhtml cleanup

    Claes Wikstrom committed Dec 25, 2011
Commits on Oct 31, 2011
  1. @vinoski

    whitespace cleanup

    vinoski committed Oct 31, 2011
    Remove all trailing whitespace from all text files. Some bot sent
    Klacke and me a pull request saying it had done this for us, but I
    reviewed the diffs and it was affecting lines that shouldn't have been
    affected, so perl and I did it ourselves instead.
Commits on Sep 26, 2011
  1. @vinoski

    add config setting for acceptor pool size

    vinoski committed Sep 26, 2011
    Add new config setting to allow the size of the acceptor process pool
    to be set to something other than the default. The default size is the
    same as what it was prior to this change. Also add documentation for
    the new setting, and augment the yaws.conf.template with information
    about it.
  2. @vinoski

    document process_options config setting

    vinoski committed Sep 26, 2011
    The process_options config setting was not documented, so add it to
Commits on May 25, 2011
  1. @vinoski

    increase default maximum wait-started time

    vinoski committed May 25, 2011
    Increase the default maximum time for the yaws --wait-started option
    from 6 seconds to 30 seconds. The test suite was seeing random
    failures due to 6 second wait not being enough. (The option doesn't
    mean it waits for 30 seconds every time, just that it will wait for a
    maximum of 30 seconds for yaws with the specified id to start.)
Commits on May 24, 2011
  1. @capflam @vinoski

    allow Server header customization (capflam)

    capflam committed with vinoski May 3, 2011
    Add the server_signature directive in the global part of configuration
    to allow users to customize the HTTP Server header.
  2. @capflam @vinoski

    add shaper directive to control access (capflam)

    capflam committed with vinoski May 4, 2011
    inspired by the mod_bwshare module of Apache, add the shaper directive
    to control access to virtual servers. Access can be controlled based
    on the client's IP address. It is also possible to throttle HTTP
    requests based on the client's download rate. External modules used to
    shape the traffic must implement the new behaviour yaws_shaper.
  3. @capflam @vinoski

    allow conf file pathname config with app env var (capflam)

    capflam committed with vinoski May 3, 2011
    Prior to this change you could customize the path to the configuration
    file with the --conf command line argument, otherwise Yaws would use
    the default configuration file. With this patch, you can also use the
    application environment variable "config" to set the path of the
    default configuration file.
  4. @capflam @vinoski

    support external handler to interpret php scripts (capflam)

    capflam committed with vinoski May 3, 2011
    phpfcgi is now deprecated. Instead, you must use php_handler. This
    directive is used to customize the handler to interpret .php files. It
    can be one of the following definitions:
      - php_handler = <cgi, Filename>
      - php_handler = <fcgi, Host:Port>
      - php_handler = <extern, Module:Function | Node:Module:Function>
    If there is no php_handler or deprecated phpfcgi directive, we use the
    value of php_exe_path. Its default value is "/usr/bin/php-cgi" but it
    can be customized.
  5. @capflam @vinoski

    allow multiple listen directives per server (capflam)

    capflam committed with vinoski May 11, 2011
    Sometimes, a virtual server must be bound to several IP
    addresses. Previously you had to duplicate virtual server
    configuration and change the address to listen on.
    Now, multiple Listen directives are allowed without any
    duplication. For example, if your server must listen on loopback
    address on both IPv4 and IPv6, your server part may be:
      <server >
        port = 80
        listen =
        listen = ::1
  6. @capflam @vinoski

    server-specific logger_mod and auth_mod (capflam)

    capflam committed with vinoski May 4, 2011
    Make logger_mod and auth_mod configuration variables local to each
    virtual server. The logger_mod variable can be used to customize
    access and auth messages. The auth_log variable previously was global,
    but it now lives in the server configuration and the global variable
    is deprecated.
    The new behaviour yaws_logger must be used to define external modules
    to log messages.
Commits on May 23, 2011
  1. @capflam @vinoski

    add control for "Expires" and "Cache-Control" response headers (capflam)

    capflam committed with vinoski May 3, 2011
    Allow an expires list in the server configuration and add "Expires"
    and "Cache-Control" headers in responses if the mime type of the
    document matches an element of this list. Like the Apache mod_expires
    module, the "expires" configuration directive controls the setting of
    the Expires HTTP header and the max-age directive of the Cache-Control
    HTTP header in server responses. The expiration date can be relative
    to either the time the source file was last modified or to the time of
    the client access. It is possible to have multiple expires directives
    for a virtual server.
    Here is an example:
      <server >
        expires = <image/gif, access+2592000> <image/png, access+2592000>
        expires = <image/jpeg, access+2592000> <text/css, access+2592000>
        expires = <application/javascript, modify+2592000>
  2. @capflam @vinoski

    authorization improvements (capflam)

    capflam committed with vinoski May 4, 2011
    There are two changes here. The first improves the implementation of
    authentication mechanisms, like authentication inside all docroots and
    recursion through subdirectories (if you define an authentication
    policy for a directory, then it is automatically applied to any
    subdirectories, except those with their own authentication policy). It
    also adds the docroot directive in auth structures (or .yaws_auth
    files) to restrict it to a specific docroot (no docroot configured
    means all docroots). We can now also configure authentication for
    specific files instead of just directories.
    The second one adds ACLs (Access Control List), like Apache's
    mod_access module, to protect data. You can add directives in auth
    structures (or .yaws_auth files) to control access to particular parts
    of the server based on the client IP address. The allow and deny
    directives are used to specify which clients are or are not allowed to
    access to the server, while the order directive sets the default
    access state and configures how the allow and deny directives interact
    with each other. Use "/" as default directory in auth structure;
    yaws.conf manpage has been updated accordingly.
    Here is an example:
      <server >
          docroot = /var/www/yakaz/admin
          deny    = all
          allow   =,
          order   = deny,allow
Commits on Apr 3, 2011
  1. @vinoski

    add configurable access logging

    vinoski committed Apr 3, 2011
    Add the global logger_mod config variable to allow for customized
    access logging. Document logger_mod in yaws.conf.5 and yaws.tex.
Commits on Mar 5, 2011
  1. Some dialyzer fixes - no real bugs, just enhancements, removed the de…

    committed Mar 5, 2011
    …precated feature of fdsrv, and fixed some bugs recently introduced by Tobbe and yaws_session_server
Something went wrong with that request. Please try again.