Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Mar 15, 2013
  1. @vinoski

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

    vinoski authored
    The merge_header functions allow HTTP headers and their values to be set
    and combined in a #headers{} record.
Commits on Jan 3, 2013
  1. Add support for deactivation of cache in reentrant calls

    Christopher Faulet authored
  2. Add support of the 'Vary' header in response

    Christopher Faulet authored
    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).
  3. Update docs & testsuite accordingly

    Christopher Faulet authored
Commits on Oct 6, 2012
  1. @saleyn

    Added RFC6265 compliant variant of setcookie.

    saleyn authored
    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.
Commits on Oct 4, 2012
  1. @vinoski

    some man page cleanup/repair

    vinoski authored
Commits on Aug 23, 2012
  1. @vinoski
Commits on Jul 25, 2012
  1. @capflam

    Make the mime types mappings configurable

    Christopher Faulet authored capflam committed
    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.
Commits on Jul 10, 2012
  1. @vinoski

    wrap SSL sockets in tuple

    vinoski authored
    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. Refactor Set-Cookie/Cookie header parsing to follow RFC6265

    Christopher Faulet authored
    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 authored
    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.
Commits on Jun 27, 2012
  1. @vinoski

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

    vinoski authored
    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 Apr 27, 2012
  1. Fix bugs in yaws_api:parse_multipart_post/1,2 for chunked requests

    Christopher Faulet authored
    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 Feb 21, 2012
  1. Manage all 'special' headers of #headers{} and #outh{} records

    Christopher Faulet authored
    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. Fix issue #88

    Christopher Faulet authored
    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 Jan 18, 2012
  1. @sgolovan @vinoski

    fix syntax and spelling errors in man pages

    sgolovan authored vinoski committed
    In man/yaws.conf.5, man/yaws_api.5: Fixed a few syntax and spelling
    errors in manpages.
Commits on Jan 6, 2012
  1. Update documentation and manpages accordingly

    Christopher Faulet authored
Commits on Dec 25, 2011
  1. exhtml cleanup

    Claes Wikstrom authored
Commits on May 12, 2010
  1. @vinoski

    Allow "stream processes" to close the client socket

    vinoski authored
    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.
Commits on Oct 17, 2009
  1. @vinoski

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

    vinoski authored
    …tation and comments in yaws_cgi.erl
Commits on Sep 21, 2009
  1. @vinoski
Commits on Jul 10, 2009
  1. cgi support

    authored
Commits on Apr 27, 2009
  1. doc patch from kevingrimes

    authored
Commits on Jan 22, 2009
Commits on Oct 20, 2008
  1. doc fixes

    authored
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1286 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on Sep 12, 2008
  1. added redirect_self to yaws_api

    authored
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1276 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on Jul 1, 2008
  1. speling

    authored
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1265 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  2. modified patch by Robert David to add a hook to yaws session server w…

    authored
    …hen a session is gone
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1264 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on Feb 14, 2008
  1. untabified all of yaws

    authored
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1217 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on Nov 10, 2007
  1. git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…

    authored
    …/yaws@1175 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on May 24, 2007
Commits on Sep 20, 2006
  1. *** empty log message ***

    authored
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1029 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on Apr 27, 2006
  1. added support for 2 additional configure

    authored
    flags, --disable-pam and --with-extrainclude=DIR
    
    Worked the Makefiles to properly support DESTDIR. This is
    useful for packagers (deb, rpm ...)
    
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@960 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on Feb 1, 2006
  1. added pam support + prepare for 1.58

    authored
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@932 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
Commits on May 23, 2005
  1. ""

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