Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 9, 2013
  1. @vinoski

    add soap server concurrency (Andreas Hellstrom)

    vinoski authored
    Add soap_workers param in global conf record, defaulting to 3 workers.  Add
    handling of soap_workers config param in yaws_config.  Add
    gconf.soap_workers arg in add_yaws_soap_srv/2.  Modify start_link and init
    in yaws_soap_srv to receive optional NumOfWorkers arg and start that number
    of workers at startup in init_complete().  Send SOAP request/add_wsdl calls
    to worker process.  Move some internal functions to new
    yaws_soap_srv_worker module. Add yaws_soap_sup to supervise SOAP workers.
    Augment documentation to reflect soap_workers config param, and also add
    the enable_soap param to the docs since it was missing.
Commits on May 3, 2013
  1. @vinoski

    fix editing error in yaws.tex

    vinoski authored
Commits on Apr 27, 2013
  1. @capflam

    Add the global directive 'src_dir' to define source directories

    capflam authored
    Yaws will compile all erlang modules found in these directories. The
    compilation occurs when the configuration is loaded or reloaded. The
    include_dir directives are used to search for include files. Multiple
    src_dir directives may be used. There is no such directory configured by
    default.
  2. @capflam

    Add 'Last-Modified' header only for static files or 304 responses

    Christopher Faulet authored capflam committed
    It is a partial rollback of the commit 89f3ea2.
    The browsers seem to use this header to do aggressive cache (using some
    strange heuristics), without doing any request to the server. IMHO, it is
    a bug in browsers. Nevertheless, this header is useless for dynamic resources.
    So we can skip it. When this header is meaningful for user's application, it
    could be added explicitly.
  3. @capflam

    Add serveralias directive

    Christopher Faulet authored capflam committed
    Now it is possible to set alternate names for a virtual host. A server alias
    may contain wildcards:
     - '*' matches any sequence of zero or more characters
     - '?' matches one character unless that character is a period ('.')
    
    Here is an example:
    
      <server server.domain.com>
        serveralias = server server2.domain.com server2
        serveralias = *.server.domain.com *.server?.domain.com
        ...
      </server>
Commits on Apr 23, 2013
  1. @vinoski
Commits on Apr 21, 2013
  1. @vinoski
  2. @vinoski

    add yaws_api:get_listen_port/1

    vinoski authored
    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.
  3. @vinoski
Commits on Apr 8, 2013
  1. General whitespace and indent cleanup, removed trailing whitespace an…

    authored
    …d constrained code to 80 cols
Commits on Apr 7, 2013
  1. @vinoski
  2. @vinoski

    fix dialyzer warnings

    vinoski authored
  3. @vinoski
  4. @vinoski

    increase server stop wait time for tests

    vinoski authored
    Increase the server stop wait time in test/support/include.mk.in so that
    it's long enough to work with debug builds.
Commits on Apr 4, 2013
  1. @vinoski
Commits on Mar 25, 2013
  1. @vinoski

    Move WebDAV to an appmod, the locking server to a runmod (tjeerd)

    vinoski authored
    All WebDAV functionality is moved to an appmod so the extension methods and
    additional response headers are not part of yaws_server.erl and yaws.erl
    anymore. Also the locking server is now a runmod so it is not started by
    the supervisor and can be used only when needed.
    
    Additionally the 100-Continue code is moved so it can be returned to all
    requests that contain a body.
    
    The WebDAV functionality is tested against the litmus test. All tests are
    passed, except the ones that require unsupported properties. The test shows
    this as a fail while returning 404 should be sufficient.
  2. @vinoski
Commits on Mar 19, 2013
  1. preparing for yaws 1.96

    authored
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 Mar 8, 2013
  1. @vinoski
  2. @vinoski

    fix issue #140

    vinoski authored
Commits on Mar 3, 2013
  1. @vinoski
Commits on Feb 27, 2013
  1. @vinoski

    fix R16B dialyzer issue

    vinoski authored
Commits on Feb 15, 2013
  1. spelling err

    authored
Commits on Feb 12, 2013
  1. Fix typo in documentation

    Christopher Faulet authored
Commits on Feb 11, 2013
  1. Refactor WebSockets and add support of optional callback functions

    Christopher Faulet authored
    Main changes:
      * Fix some bugs about UTF-8 encoding and messages fragmentation
      * Add support of optional callback functions
      * Add support of many startup options
      * Add support of outgoing fragmented messages
      * Add a websocket testsuite
    
                                     - * -
    *** bug fixes ***
    
    First of all, an huge part of yaws_websocket.erl was rewritten to fix bugs
    about the messages fragmentation and the UTF-8 encoding of incoming text
    messages:
    
      * UTF-8 encoding
        before, when a text message was fragmented, only the first frame was
        checked and partial UTF-8 sequences were not supported. Now, checks
        are done on each message part and a partial UTF-8 sequence at the end
        of a frame is accumulated and checked with the next frame (for basic
        callback only).
    
      * Messages fragmentation
        for basic callback modules, because of a buggy mapping between frames
        and messages, the messages fragmentation was almost unusable. To fix
        this, the message handling was rewritten.
    
    Now, all tests in the autobahn testsuite[1] pass successfully.
    
                                     - * -
    *** Optional callback functions ***
    
    Then, from an idea of François de Metz[2], yaws_websocket module was
    extended to support optional callback functions. See the documentation for
    details (www/websockets.yaws).
    
    Quickly, optional callback functions are:
    
      * Module:init/1           (for basic and advanced callback modules)
      * Module:terminate/2      (for basic and advanced callback modules)
      * Module:handle_open/2    (for basic and advanced callback modules)
      * Module:handle_info/2    (for basic and advanced callback modules)
      * Module:handle_message/2 (for basic callback modules only, used in place
                                 of Module:handle_message/1)
    
    Thanks to Pablo Vieytes[3] which added handle_info to optional callback
    functions.
                                     - * -
    *** Startup options ***
    
    To start a websocket process a script must return the following term from
    its out/1 function:
    
      {websocket, CallbackMod, Options}
    
    where 'Options' is a (possibly empty) proplist. Following parameters are
    supported:
    
      * {origin, Orig}
      * {callback, Type}
      * {keepalive, Boolean}
      * {keepalive_timeout, Tout}
      * {keepalive_grace_period, Time}
      * {drop_on_timeout, Boolean}
      * {close_timeout, Tout}
      * {close_if_unmasked, Boolean}
      * {max_frame_size, Int}
      * {max_message_size, Int}
      * {auto_fragment_message, Boolean}
      * {auto_fragment_threshold, Int}
    
    See the documentation for details (www/websockets.yaws).
    
                                     - * -
    *** Outgoing fragmented messages ***
    
    A callback module can now send fragmented messages to clients using the
    record #ws_frame{}:
    
     #ws_frame{fin     = true,  %% true | false
               rsv     = 0,
               opcode,          %% text | binary | continuation...
               payload = <<>>}. %% binary(), unmasked data
    
    --
    [1] http://autobahn.ws/testsuite
    [2] #99
    [3] https://github.com/pvieytes
Commits on Jan 3, 2013
  1. Adjust line numbers in known_dialyzer_warnings file

    Christopher Faulet authored
  2. Add access functions for #gconf{} and #sconf{} records

    Christopher Faulet authored
    Applications may want to retrieve information in it. yaws:gconf_*/1 and
    yaws:sconf_*/1 should be used in preference to a direct access to reduce
    the dependence of your code on these records. So internal modifications
    could be done avoiding the need to update and recompile your application.
    
    Update www/internals.yaws accordingly and remove dependency on 'yaws.hrl'
    in examples and applications. Add unit tests to check #gconf{} and #sconf{}
    setup.
  3. Add support for deactivation of cache in reentrant calls

    Christopher Faulet authored
  4. 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).
  5. Fix checks on the response content type when a charset is present

    Christopher Faulet authored
    When we test if a response is compressible or not, or when 'Expires' and
    'Cache-Control' headers are set, the charset must be removed from the
    response content-type to only keep the response mime-type.
  6. Fix when 'Expires' and 'Cache-Control' headers are set

    Christopher Faulet authored
    Because the content-type of the response may change many times during the
    request handling process, we must wait the #outh{} serialization to set it.
    
    Note: 'Last-modified' header is also managed in a same way because there is
    no good reason to set it before.
  7. Update docs & testsuite accordingly

    Christopher Faulet authored
  8. Flush remaining data in case of 3xx redirect

    Christopher Faulet authored
    When Yaws returns a 3xx response, if the client connection is kept alive,
    the remaining data must be flushed. Else the next request on the same
    connection cannot be handled.
Something went wrong with that request. Please try again.