Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Nov 21, 2013

  1. Robby Raschke

    Merge pull request #1 from Lastres/fix-unicode-json

    Change binary conversion function in yaws_rpc in order to deal with unicode characters
    
    This means that JSON gets parsed with strings containing Unicode codepoints instead of UTF-8 bytes.
    rtraschke authored
  2. Ramón Lastres

    Change binary conversion function in yaws_rpc in order to deal with u…

    …nicode characters
    lastres authored

Mar 19, 2013

  1. Marcel Mueller

    added urlencoded handler

    marmll authored

Mar 13, 2013

  1. Konrad Kaplita

    Remove no_debug_info compile flag

    konradkaplita authored

Mar 12, 2013

  1. Marcel Mueller

    added json handler and urlencoded handler for split the different han…

    …dling of the content type
    marmll authored
  2. Marcel Mueller

    bugfix

    marmll authored
  3. Marcel Mueller

    bugfixed

    marmll authored
  4. Marcel Mueller

    changed to urlencoded

    marmll authored
  5. Marcel Mueller

    urlencoded parameter inserted

    marmll authored
  6. Marcel Mueller

    changed back to http_uri

    marmll authored
  7. Marcel Mueller

    cahnged back to yaws uri decode

    marmll authored
  8. Marcel Mueller

    cahnged the RpcType after it's urlencoded to json for the further pro…

    …cess
    marmll authored
  9. Marcel Mueller

    changed the rpc handler content type

    marmll authored

Mar 11, 2013

  1. Marcel Mueller

    changed to http_uri

    marmll authored

Mar 08, 2013

  1. Steve Vinoski

    fix overflowing line in yaws.tex

    vinoski authored
  2. Steve Vinoski

    fix issue #140

    vinoski authored

Mar 03, 2013

  1. Steve Vinoski

    fix deprecated make_default_sconf/0 to return sconf, not gconf

    vinoski authored

Feb 27, 2013

  1. Steve Vinoski

    fix R16B dialyzer issue

    vinoski authored

Feb 15, 2013

  1. Claes Wikstrom

    spelling err

    klacke authored

Feb 12, 2013

  1. Christopher Faulet

    Fix typo in documentation

    capflam authored

Feb 11, 2013

  1. Christopher Faulet

    Refactor WebSockets and add support of optional callback functions

    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] klacke#99
    [3] https://github.com/pvieytes
    capflam authored

Jan 03, 2013

  1. Christopher Faulet

    Adjust line numbers in known_dialyzer_warnings file

    capflam authored
  2. Christopher Faulet

    Add access functions for #gconf{} and #sconf{} records

    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.
    capflam authored
  3. Christopher Faulet

    Add support for deactivation of cache in reentrant calls

    capflam authored
  4. 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).
    capflam authored
  5. Christopher Faulet

    Fix checks on the response content type when a charset is present

    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.
    capflam authored
  6. Christopher Faulet

    Fix when 'Expires' and 'Cache-Control' headers are set

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

    Update docs & testsuite accordingly

    capflam authored
  8. Christopher Faulet

    Flush remaining data in case of 3xx redirect

    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.
    capflam authored
  9. Christopher Faulet

    Fix a bug: redirect URL must be url-encoded

    capflam authored
  10. Christopher Faulet

    Keep info about the original request during a reentrant call

    Some information must be preserved during a reentrant call. From the original
    request, we keep:
      * buffered data (Arg#arg.clidata) and the number of bytes read
      * the request state (Arg#arg.cont & Arg#arg.state)
    capflam authored
  11. Christopher Faulet

    Add a clause to yaws_api:url_encode to handle deep lists

    capflam authored
  12. Christopher Faulet

    Make be possible to chain appmods

    Before, all appmods were disabled during a reentrent call. So it was
    impossible to chain appmods. Now, it is possible. Only the current appmod
    is disabled for the next recursion (if we are inside an appmod of course).
    
    So if we have this configuration for appmods:
    
      appmods = </foo, foo> </bar, bar>
    
    When "/foo" is requested, the appmon "foo" is called. At this step, it is
    possible to call the appmod "bar" by returning {page, "/bar"}.
    capflam authored

Dec 01, 2012

  1. weisslj

    Support multipart/form-data "name" with backslash at the end.

    Also add multipart/form-data tests ("name" with escaped characters).
    weisslj authored vinoski committed

Nov 29, 2012

  1. Christopher Faulet

    Merge pull request #133 from olgeni/tilde_injection_fix

    Fix io:format call in yaws_compile.
    capflam authored
Something went wrong with that request. Please try again.