Skip to content
This repository

Sep 08, 2012

  1. Kenji Rikitake

    Update Makefile and src/Makefile

    * Targets in `Makefile` of `yaws.plt` and `dialyzer` calls
      dialyzer with two target directories, `ebin` and `src`;
      this causes the error of duplicate modules.
      Checking out the .beam files under `ebin` is sufficient
      for dialyzer; `src` is removed.
    * Target `mime_type_c.beam` in `src/Makefile` is
      superfluous and generates a spurious .beam file in
      the `src` directory, so the target is removed.
      Also target `charset.def` in `src/Makefile` should be
      dependent on `../ebin/mime_type_c.beam`, so this is
      also changed from the previous target without the
      directory path.
    jj1bdx authored

Jul 25, 2012

  1. Christopher Faulet

    Make the mime types mappings configurable

    Now, it possible to customize the global mime types mappings and to overload
    it for each virtual server. It can be done using following directives in the
    global part or the server part of the configuration:
    * default_type: Defines the default mime type to be used where Yaws cannot
      determine it by its mime types mappings (default: text/plain).
      In the server part, this directive overloads the global one.
    * default_charset: Defines the default charset to be added when a response
      content-type is text/* (default: none). In the server part, this directive
      overloads the global one.
    * mime_types_file: Overrides the default mime.types file included with Yaws
      (default: ${PREFIX}/lib/yaws/priv/mime.types). In the server part, this
      directive overloads the global one but mappings defined in this file will
      not overload those defined by add_types directives in the global part.
    * add_types: Specifies one or more mappings between mime types and file
      extensions. More than one extension can be assigned to a mime type. If a
      mapping is defined in the global part and redefined in a server part using
      this directive, then the later is used. Else the global one is kept.
    * add_charsets: Specifies one or more mappings between charsets and file
      extensions. More than one extension can be assigned to a charset. If a
      mapping is defined in the global part and redefined in a server part using
      this directive, then the later is used. Else the global one is kept.
    Here is an example:
      default_type = text/html
      <server localhost>
          port = 8000
          listen =
          docroot = /var/www
          # nothing is overloaded in the vhost
      <server localhost>
          port = 8001
          listen =
          docroot = /var/www
          # overload global configuration:
          default_type    = text/plain
          mime_types_file = /etc/mime.types
          add_types       = <text/xhtml, yaws> <application/x-test, tst test>
          default_charset = UTF-8
          add_charsets    = <ISO-8859-1, php html yaws> <US-ASCII, tst>
    During Yaws compilation, a default module 'mime_types' is created using the
    default mime.types file. Then, when yaws starts up, this module is
    re-generated, re-compiled and loaded dynamically. The new module replaces the
    default one but the .beam file is unchanged. So if one of these steps failed,
    we fall back on the default module.
    capflam authored capflam committed

Jun 25, 2012

  1. Steve Vinoski

    add support for W3C Server-Sent Events

    Server-Sent Events is a W3C working draft allowing servers to send simple
    events to a client. See the documentation in www/server_sent_events.yaws
    for a full description.
    vinoski authored

May 05, 2012

  1. Steve Vinoski

    fix yaws issue #105: configure ignores --libdir

    vinoski authored

Apr 01, 2012

  1. Tuncer Ayaz

    Use file:sendfile/5 if available

    Due to a bug in file:sendfile/5 in R15B, the yaws configure script enables
    the use of file:sendfile/5 only for versions R15B01 or greater.
    tuncer authored vinoski committed

Mar 17, 2012

  1. Kaloyan Dimitrov

    added soap12 capability

    kalski authored vinoski committed

Jan 06, 2012

  1. Christopher Faulet

    Add new module to deal with trace files

    This module is a replacement of what we find in yaws_log.erl. This is the
    first step to improve traces handling.
    Changes with yaws_log.erl:
      * Trace files are created in a subdirectory suffixed with the creation
        date. So this subdirectory changed every time yaws restarts.
      * There is 1 trace file by connection handler. So traces cannot be
        interwined with each other
      * We can enable/disable trace for a period of time (must be improved
        to be fully dynamic)
    capflam authored

Dec 21, 2011

  1. Steve Vinoski

    clean src/mime_type_c.beam during "make clean"

    vinoski authored
  2. Steve Vinoski

    treat src warnings as errors

    Fix compilation warning in yaws_dav.erl so that no compilation errors
    exist in the build, allowing us to treat warnings as errors in
    rebar.config and in src/Makefile.
    vinoski authored

Sep 23, 2011

  1. Steve Vinoski

    delete chatty messages, make yaws_server upgrade-friendly (Klarna)

    Incorporate changes from Klarna (via Richard Carlsson) to delete
    chatty messages in a variety of places. These messages were for
    success cases; they were deleted because success cases should be
    Change yaws --check to take an optional --verbose option to allow
    original verbose success messages to be emitted. Also change the yaws
    script so that the --id option works for --check.
    Change yaws_server to make fully-qualified calls to gserv_loop to
    ensure code upgrades call into the newly-loaded module version.
    vinoski authored

Aug 02, 2011

  1. Claes Wikstrom

    Added support to generate and check strict xhtml output


Jul 07, 2011

  1. Steve Vinoski

    revert "remove support for SOAP DIME attachments"

    This reverts commit 65bf36a.
    vinoski authored

May 24, 2011

  1. Christopher Faulet

    add shaper directive to control access (capflam)

    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.
    capflam authored vinoski committed
  2. Christopher Faulet

    server-specific logger_mod and auth_mod (capflam)

    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.
    capflam authored vinoski committed

May 23, 2011

  1. Christopher Faulet

    add yaws.appup.src template file (capflam)

    Add yaws.appup.src template file used to build the final yaws.appup
    file. Also add ebin/yaws.appup to .gitignore.
    capflam authored vinoski committed

May 07, 2011

  1. Tuncer Ayaz

    add rebar support (Tuncer Ayaz and Steve Vinoski)

    Add support for building yaws with rebar. The original configure and
    make support is kept intact.
    If you build with rebar you get a local install. The rebar approach
    does not support a regular install, which defaults into /usr/local. If
    you want a regular install, use configure and make.
    Create a new top-level contrib directory and move unused src files
    there. Also move src/benchmarks and src/contrib contents there as
    well. Remove the obsolete src/patches directory. This is all to keep
    rebar from compiling this unused code (since by default it compiles
    everything under the src dir).
    Move a number of build rules out of Makefiles into separate scripts so
    they can be used by both rebar and make.
    Modify yaws version specifier and handling to be amenable to rebar.
    Clean up trailing whitespace in a number of scripts and Makefiles.
    Use the following environment variables to customize the rebar build
    DEFAULT_CHARSET: used in mime type table (default: "")
    ERLBINDIR: e.g. /usr/local/bin
    ETCDIR: etc directory (default: ./etc)
    VARDIR: var directory (default: ./var)
    tuncer authored vinoski committed

Apr 24, 2011

  1. Steve Vinoski

    replace json.erl with json2.erl to fix issue 50

    Yaws issue 50 (#50) notes that
    the json.erl module uses list_to_atom and is therefore dangerous due
    to the possibility of filling the atom table. Also, the test function
    in json.erl has been broken for quite some time. Deprecate json.erl
    and add json2.erl, which avoids list_to_atom. Repair the json2:test/0
    function inherited from json.erl and add it to the t1 test
    suite. Change www/json_intro.yaws to refer to json2.
    vinoski authored

Apr 16, 2011

  1. Steve Vinoski

    change sendfile driver handler to a gen_server

    Rather than use a custom message handling loop, make the yaws_sendfile
    driver handler a gen_server. Collapse the yaws_sendfile_compat
    functionality directly into yaws_sendfile and remove
    yaws_sendfile_compat, and change all references to
    yaws_sendfile_compat to refer to yaws_sendfile instead.
    vinoski authored

Mar 03, 2011

  1. Steve Vinoski

    remove support for SOAP DIME attachments

    Remove DIME support. We're cleaning up dialyzer errors in Yaws and the
    DIME code had some problems, so we decided to drop it rather than try
    to fix it since we don't believe anyone's using it. Microsoft has
    dropped support for DIME anyway, recommending MTOM instead.
    vinoski authored

Dec 08, 2010

  1. Steve Vinoski

    add configure detection of erts bits support

    The websockets support relies on bits support in Erlang. The
    src/Makefile used to contain a gmake shell command for checking the
    erts version to see if bits support was present. This change moves
    that test into the configure scripts and adds a new make variable to that src/Makefile can use instead. This keeps configuration
    checks out of the makefiles and in the configure script where they
    Also fixed the test for bits support, which would have been incorrect
    once the erts major version number increases above 5 because it also
    unconditionally wanted the erts minor number to be greater than 6, so
    a major/minor version such as 6.0 would have failed.
    vinoski authored

Nov 18, 2010

  1. Peter Lemenkov

    Typo fix in previous commit

    Module yaws_dime should be listed w/o extension.
    Signed-off-by: Peter Lemenkov <>
    lemenkov authored

Nov 17, 2010

  1. Peter Lemenkov

    Add yaws_dime.erl to the list of modules to compile

    This module is used in yaws_rpc, yaws_soap_lib and
    yaws_soap_srv modules but it wasn't compiled. So it's
    quite likely that application will fails with 'undef'
    Signed-off-by: Peter Lemenkov <>
    lemenkov authored

Oct 07, 2010

  1. Adding yaws_vdir.erl to the Makefile.

    Torbjorn Tornkvist authored

Feb 18, 2010

  1. Claes Wikstrom

    dialyzer work


Jan 05, 2010

  1. Claes Wikstrom

    conditional compile of websockets


Dec 18, 2009

  1. Davide

    HTML5 Web Sockets support.

    davide authored

Nov 29, 2009

  1. Claes Wikstrom

    clean target


Sep 30, 2009

  1. Steve Vinoski

    move yaws_multipart.erl to src dir and incorporate klacke's changes

    vinoski authored

Jul 10, 2009

  1. Claes Wikstrom

    cgi support


Jun 12, 2009

  1. Olivier Girondel

    Compile yaws_stats

    oliv3 authored

Apr 15, 2009

  1. Fabian Alenius

    Changed the way authentication is done, added support for multiple au…

    …thentication methods to be used for one directory and changed so that the
    401 page can be customized similarly to the 404 page.
    1. Renamed yaws_401.erl to yaws_outmod.erl, which is probably a better name considering it's current use(it also displays the crashmsg).
    2. Fixed the Makefile accordingly.
    2. Changed so that the auth record not only contains the authentication methods but also the headers that should be displayed for the
    3. The headers are added in yaws_config.erl when the config file is parsed, the authmods now has to have a function get_headers/1 that
    returns the http headers that are to be displayed.
    3. is_auth now goes through the list of directories and when a matching directory is found it calls handle_auth which does the actual
    4. handle_auth checks all the methods specified in the config file, if _one_ returns true, the user is authorized to view the page.
    5. Removed deliver_401 and changed so that handle_ut is called with UrlType = unauthorized.
    6. Changed handle_ut to handle UrlType = unauthorized, it handles it similarly to when it displays 404. It pulls the errormod_401 from the
    GC and calls out401 to display the actual page.
    7. Added a function outh_set_auth/1 to yaws.erl which takes a string or a {realm, Realm} tuple and returns the corresponding WWW-Authenticate
    8. Fixed so that the headers are displayed when the 401 page is displayed.
    9. Removed the special handling of appmod in handle_request. Previously authmods would return appmod when they wanted the 401 page to be
    displayed, this is no longer neccessary.
    10. Removed the out function from authmod_gssapi.erl.
    11. Changed the behaviour of authmod_gssapi so that it simply returns fales when it doesn't find called with the correct headers.
    Previously it would crash.
    TODO: Add support for multiple authmods and Pam modules for one directory.
    Rewrite authmod_gssapi so that it simply returns true or false.
    Fix a bug in yaws_ls, it links directories without the final / which means that every time you enter a directory first a 302 page is sent with
    a redirect to "dir/".
    Properly sort the WWW-authenticate headers, apparently the order mathers. For example Negoiate needs to be above Basic realm for
    it to use Negoiate.
    faal authored

Jan 29, 2009

  1. Steve Vinoski

    add --disable-sendfile option to configure, fix src/Makefile to clean…

    … yaws_configure.hrl
    git-svn-id: 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    vinoski authored

Jan 13, 2009

  1. Claes Wikstrom

    added one_for_one supervisor

    git-svn-id: 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52

Dec 21, 2008

  1. Steve Vinoski

    1. fixes for yaws_sendfile_compat for non-sendfile platforms

    2. in src/Makefile made yaws_sendfile_compat.beam depend on yaws_configure.hrl
    git-svn-id: 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    vinoski authored

Dec 20, 2008

  1. Steve Vinoski

    tie yaws_sendfile_compat into yaws_server

    git-svn-id: 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    vinoski authored
Something went wrong with that request. Please try again.