Skip to content
This repository

Jul 10, 2012

  1. 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.
    capflam authored

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

Apr 11, 2012

  1. Steve Vinoski

    cosmetic comment and whitespace cleanup in yaws_api.hrl

    vinoski authored

Dec 18, 2011

  1. JD Bothma

    update WebSockets implementation to support RFC 6455

    This change allows websocket connections to be set up between browsers
    and the yaws server. RFC 6455 for WebSocket connections is supported,
    in addition to the hybi working group RFC drafts 10 to 17.
    
    The quickest way to try this out is by compiling yaws as usual, then
    visiting /websockets_example.yaws at the default local installation
    host. This can be done using Google Chrome 14+, Firefox 7+ or any
    other browser supporting WebSocket version 8 or above. Information
    about getting started with WebSockets using this implementation is
    given in /websockets.yaws.
    
    This drops support for the older draft RFCs, specifically those of the
    hixie working group which were previously supported by yaws but are
    significantly different from the hybi working group's specification.
    
    The interface for using WebSocket with yaws has changed
    somewhat. Instead of spawning a websocket owner process which
    maintains a server loop such as that shown in the old
    websockets_endpoint.yaws, the application developer now implements a
    callback module such as those in src/basic_echo_callback.erl or
    src/advanced_echo_callback.erl -- the difference being that the
    advanced callback style is only necessary if you need advanced
    features of WebSocket such as fragmented messages. One suggested way
    to deploy your callback module and its dependencies is as part of an
    application in an OTP release, with yaws as a dependency. Rebar can be
    used to build the dependencies, fetch and build yaws, and create a
    release which will ensure the modules are in the path of the runtime
    system.
    
    Most behaviour tested by the Autobahn test suite 0.43 pass when
    configured to connect to the /websockets_autobahn_endpoint.yaws and
    /websockets_example_endpoint.yaws over an unencrypted
    connection. Significantly, websocket connection closing is not
    implemented and the socket is left to be cleaned up by the Runtime
    System when either the connection is lost or the owning processes
    dies. Secondly, certain cases where websocket frames are fragmented
    within UTF-8 code points cause the check for valid text type messages
    to incorrectly fail the connection.
    
    Subprotocols are not currently supported.
    
    Augment yaws.tex with a new WebSocket Protocol chapter (Steve
    Vinoski).
    jbothma authored vinoski committed

May 24, 2011

  1. Christopher Faulet

    arg_rewrite mods can now return HTTP responses (capflam)

    Module used to rewrite arg records can now return any HTTP
    response. This can be used to redirect requests or to return an
    error. To do so, such a module must set the element #arg.state using
    the record #rewrite_response{}. The record #rewrite_response{}
    contains 3 elements:
    
      status: any valid HTTP status code
      headers: a list of {header, H}
      content: an iolist
    
    For example, to do an unconditional redirect to http://www.yakaz.com,
    you can use the module simple_redir_mod.erl:
    
      -module(simple_redir_mod.erl).
      -export([arg_rewrite/1]).
      -include_lib("yaws/include/yaws_api.hrl").
    
      arg_rewrite(Arg) ->
        L = "http://www.yakaz.com",
        H = [{header, {location, L}}],
        RwResp = #rewrite_response{status=301, headers=H}
        Arg#arg{state=RwResp}.
    capflam authored vinoski committed

Apr 20, 2011

  1. Steve Vinoski

    major trailing whitespace cleanup

    Remove trailing whitespace in all .erl and .hrl files in the
    repository.
    
    If you're an emacs user, you can easily see trailing whitespace using
    settings like these in your ~/.emacs file:
    
    (setq-default show-trailing-whitespace t)
    (set-face-background 'trailing-whitespace "slate gray")
    
    You can also delete trailing whitespace automatically when you save
    your Erlang sources by setting the emacs before-save-hook in your
    ~/.emacs file like this:
    
    (add-hook 'before-save-hook
              '(lambda () (if (eq major-mode 'erlang-mode)
                              (delete-trailing-whitespace))))
    vinoski authored

Oct 21, 2010

  1. Fabian Linzberger

    add implementation of X-Forwarded-For header (Fabian Linzberger)

    * Add x_forwarded_for_log_proxy_whitelist global config parameter and
      parsing for it.
    
    * Add x_forwarded_for header in record definition and collection
      (based on code by Chris Double he mentions on
      http://www.bluishcoder.co.nz/2006/04/handling-x-forwarded-for-in-yaws.html)
    
    * For yaws_server:maybe_access_log/3: if originating IP is present in
      x_forwarded_for_log_proxy_whitelist, log last IP found in
      x-forwarded-for header instead of originating IP
    lefant authored vinoski committed

Jul 10, 2009

  1. Claes Wikstrom

    cgi support

    authored

Feb 13, 2009

  1. Claes Wikstrom

    cleaned up the redirect feature. It was poorly implemented and poorly…

    … documented. This fix is backwards compatible for users using redirect in confd.conf. However, it is NOT backwards compatible for embedded users that specify the redirect_map explicitly in their #sconf{} records. The required changes for embedded users should be evident from the code. The new required format is documented in the code where #sconf{} is defined
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1391 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

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

Dec 01, 2007

  1. Claes Wikstrom

    tabs cleanup

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1181 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Feb 23, 2007

  1. jonhen

    Virtual Directory support. ARG record and CGI variable changes

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1093 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    jonhen authored

Sep 20, 2006

  1. Claes Wikstrom

    added the client IP address to the #arg record

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1027 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Mar 16, 2004

  1. Claes Wikstrom

    Removed the atoms in parse_post and parse query, backwards incompatib…

    …le change updateed wiki and mail for this, added a backwards_compat_flag to gconf put gconf and sconf in the dictionary as opposed to passing them around as args reworked url_type so there are no more flat lists, removed the list_to_atom call for the spec cache.
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@632 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Mar 13, 2004

  1. Claes Wikstrom

    ""

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@630 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Mar 10, 2004

  1. Claes Wikstrom

    postvar bug by hal snyder, added yaws_api:query_url/1 added the id su…

    …pport and removed the uid stuff, added -j to control trace of a running daemon, bugfixes in the logger,
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@626 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Feb 08, 2004

  1. carsten3347

    Support for `Content-Encoding: deflate' using zlib.

    This feature has to be turned on in the server part of yaws.conf
    (`deflate = true').
    
    Still experimental and for static files only.  Cached files are
    compressed just once.  Large files are compressed on the fly, and only
    if the mime type makes it seem wothwhile (see
    yaws_server:compressible_mime_type).  No docs so far.
    
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@594 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    carsten3347 authored

Dec 17, 2003

  1. Claes Wikstrom

    postvar(), queryvar(), ssi docs

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

    ssi include with var expansion + docs

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@561 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Dec 15, 2003

  1. Claes Wikstrom

    first almost working vsn of revproxy

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@558 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Dec 05, 2003

  1. Added set cookie parser

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@556 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    Johan Bevemyr authored

Aug 25, 2003

  1. carsten3347

    comment to arg record field `pathinfo'

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@493 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    carsten3347 authored

Jul 16, 2003

  1. carsten3347

    Added CGI and PHP support.

    Also for a request like
         /a/b/c.xxx/d/e
    with xxx being one of `yaws', `cgi' or `php' and c.xxx being a plain
    file, /a/b/c.xxx is called with Arg#arg.pathinfo, respectively the
    environment variable PATH_INFO, set to `/d/e'.
    
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@459 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    carsten3347 authored

Jul 12, 2003

  1. Added the field server_path, which will store the parsed and normaliz…

    …ed path of the request string. This is in preparation for some significant clean-ups of the yaws_server.erl code.
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@448 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    Leon Smith authored

Nov 20, 2002

  1. Claes Wikstrom

    parse_url

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@290 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Nov 18, 2002

  1. Added #args.appmod_prepath which contains the path in front

    of <appmod><appmoddata>
    
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@282 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    Tobbe Tornquist authored

Nov 07, 2002

  1. Claes Wikstrom

    ""

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@252 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Oct 16, 2002

  1. Claes Wikstrom

    made backwards incompatible change to parse_post_data

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@210 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Oct 15, 2002

  1. Claes Wikstrom

    fixed tilde username expansion it didn't work, also made thta a confi…

    …gurable in the config file. Added appmods a mechanism whereby an application can fake directory hierachys. Useful for applications that deliver
    
    content which isn't html. Many browsers doesn;t (read IE) don't respect the
    Content-Disposition: header, rather they just use the filename extension to
    determini which plugin to to render a file
    
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@206 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Oct 06, 2002

  1. Claes Wikstrom

    wrote the shopppingcart example

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@191 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Sep 17, 2002

  1. Claes Wikstrom

    cache_refresh to 0 if debug, added a cookie_session-server for persis…

    …tant cookie sessions
    
    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@173 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Sep 13, 2002

  1. Claes Wikstrom

    support for streamed large content from yaws code

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@162 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    authored

Aug 23, 2002

  1. added cont and state to this yaws_api.hrl

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@138 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    Seah Hinde authored

Jun 27, 2002

  1. Added fullpath to arg

    git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@116 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
    Johan Bevemyr authored

Apr 30, 2002

  1. Claes Wikstrom

    ""

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