Skip to content
This repository

Jun 13, 2013

  1. Christopher Faulet

    Keep the original request in #arg{} and check it against auth rules

    Because the request can be rewritten, it could be useful to backup the
    original one. Appmods or Yaws scripts could access it by reading the field
    orig_reg in #arg{}. For CGI scripts, the variable REQUEST_URI is now built
    using the original request (SCRIPT_NAME, PATH_INFO and QUERY_STRING could
    be used to know the info about the rewritten request, if needed).
    
    The original request is also checked against the authorization rules. So, if
    the request is rewritten, Yaws will check the original request and the
    rewritten one. Access must be granted for both urls to accept the request.
    authored May 06, 2013

Apr 23, 2013

  1. Steve Vinoski

    enhance yaws_api:get_listen_port/1 documentation

    authored April 22, 2013

Apr 21, 2013

  1. Steve Vinoski

    add yaws_api:get_listen_port/1

    For testing scenarios it can be useful to configure yaws to run on an
    ephemeral port by setting the server port number to 0. Add the
    yaws_api:get_listen_port/1 function to enable callers to retrieve the
    actual port number of a server from its listen socket. The single argument
    to the function is the #sconf{} record for the target server.
    authored April 21, 2013

Mar 15, 2013

  1. Steve Vinoski

    add yaws_api:merge_header/2 and yaws_api:merge_header/3 funs

    The merge_header functions allow HTTP headers and their values to be set
    and combined in a #headers{} record.
    authored March 13, 2013

Jan 03, 2013

  1. Christopher Faulet

    Add support for deactivation of cache in reentrant calls

    authored November 27, 2012
  2. Christopher Faulet

    Add support of the 'Vary' header in response

    With this patch, Yaws will add 'Accept-Encoding' in 'Vary' header if the
    support of gzip compression is enabled or if the response is compressed.
    The 'Vary' header can be set using 'yaws:outh_set_vary(Fields)' or by
    returning '{header, {vary, Fields}}' from scripts (where Fields is a list
    of header names).
    authored November 30, 2012
  3. Christopher Faulet

    Update docs & testsuite accordingly

    authored November 23, 2012

Oct 06, 2012

  1. Serge Aleynikov

    Added RFC6265 compliant variant of setcookie.

    The new set_cookie/3 function implements more complete RFC2109
    cookie formatting than setcookie/6 and is 10x - 15x more efficient
    than its old setcookie counterpart because of avoiding the use of
    io_lib:format/2.  The setcookie/2 through setcookie/6 are marked
    as deprecated.  The function is named set_cookie rather than setcookie
    to facilitate the ease of depricating the old implementation.
    authored October 06, 2012

Oct 04, 2012

  1. Steve Vinoski

    some man page cleanup/repair

    authored October 04, 2012

Aug 23, 2012

  1. Steve Vinoski

    document the new yaws_api:reformat_header/2 function

    authored August 23, 2012

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 = 0.0.0.0
          docroot = /var/www
          # nothing is overloaded in the vhost
      </server>
    
      <server localhost>
          port = 8001
          listen = 0.0.0.0
          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>
      </server>
    
    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.
    authored July 19, 2012 capflam committed July 25, 2012

Jul 10, 2012

  1. Steve Vinoski

    wrap SSL sockets in tuple

    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.
    authored April 20, 2012
  2. Christopher Faulet

    Refactor Set-Cookie/Cookie header parsing to follow RFC6265

    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.
    authored July 09, 2012

Jul 04, 2012

  1. Christopher Faulet

    Fix parse_set_cookie/1 and format_set_cookie/1 functions

    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
    quoted-strings.
    
    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.
    authored July 04, 2012

Jun 27, 2012

  1. Steve Vinoski

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

    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.
    authored June 27, 2012

Apr 27, 2012

  1. Christopher Faulet

    Fix bugs in yaws_api:parse_multipart_post/1,2 for chunked requests

    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.
    authored April 27, 2012

Feb 21, 2012

  1. Christopher Faulet

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

    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.
    authored February 21, 2012

Feb 15, 2012

  1. Christopher Faulet

    Fix issue #88

    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.
    authored February 15, 2012

Jan 18, 2012

  1. Sergei Golovan

    fix syntax and spelling errors in man pages

    In man/yaws.conf.5, man/yaws_api.5: Fixed a few syntax and spelling
    errors in manpages.
    authored January 16, 2012 vinoski committed January 17, 2012

Jan 06, 2012

  1. Christopher Faulet

    Update documentation and manpages accordingly

    authored January 06, 2012

Dec 25, 2011

  1. exhtml cleanup

    authored December 25, 2011

May 12, 2010

  1. Steve Vinoski

    Allow "stream processes" to close the client socket

    Yaws allows application processes to take control of the client socket
    via the streamcontent_from_pid directive. Sometimes during the course
    of its data delivery the application might find that it needs to close
    the socket, but the original design did not provide a way for the
    application to tell Yaws the socket was closed. The result was that a
    message like the one below would show up in the Yaws log whenever a
    closed socket was returned to Yaws, due to Yaws trying to continue to
    use the socket as if it were still open:
    
         =ERROR REPORT==== 12-May-2010::00:27:05 ===
         Yaws process died: {{badmatch,{error,einval}},
                             [{yaws,setopts,3},
                              {yaws,http_recv_request,2},
                              {yaws,do_http_get_headers,2},
                              {yaws,http_get_headers,2},
                              {yaws_server,aloop,3},
                              {yaws_server,acceptor0,2},
                              {proc_lib,init_p_do_apply,3}]}
    
    Change yaws_api:stream_process_end/2 to allow the application to pass
    the atom 'closed' as the first argument, in place of the socket
    argument. This informs Yaws that the socket is closed and prevents it
    from trying to keep using it, thus avoiding errors like the one above.
    authored May 12, 2010

Oct 17, 2009

  1. Steve Vinoski

    fixes for FCGI authorization (Bruno Rijsman), plus I cleaned up inden…

    …tation and comments in yaws_cgi.erl
    authored October 17, 2009

Sep 21, 2009

  1. Steve Vinoski

    document streamcontent process delivery functions

    authored September 21, 2009

Jul 10, 2009

  1. Claes Wikstrom

    cgi support

    authored July 10, 2009

Apr 27, 2009

  1. Claes Wikstrom

    doc patch from kevingrimes

    authored April 27, 2009

Jan 22, 2009

  1. Claes Wikstrom

    stream content with a timeout patch from Davide Marques

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1364 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored January 22, 2009

Oct 20, 2008

  1. Claes Wikstrom

    doc fixes

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1286 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored October 20, 2008

Sep 12, 2008

  1. Claes Wikstrom

    added redirect_self to yaws_api

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1276 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored September 12, 2008

Jul 01, 2008

  1. Claes Wikstrom

    speling

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1265 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored July 01, 2008
  2. Claes Wikstrom

    modified patch by Robert David to add a hook to yaws session server w…

    …hen a session is gone
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1264 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored July 01, 2008

Feb 14, 2008

  1. Claes Wikstrom

    untabified all of yaws

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1217 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored February 14, 2008

Nov 10, 2007

  1. Claes Wikstrom

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…

    …/yaws@1175 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored November 10, 2007

May 24, 2007

  1. Claes Wikstrom

    added a dir_listing function in yaws_api

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1117 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored May 24, 2007

Sep 20, 2006

  1. Claes Wikstrom

    *** empty log message ***

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1029 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored September 20, 2006
Something went wrong with that request. Please try again.