Permalink
Commits on Jun 27, 2012
  1. Fix is_revproxy/3 and is_redirect_map/2 in yaws.erl

    In these functions, we try to find the longest matching prefix and not
    the first anymore. So we can have several revproxy/redirect_map definitions
    for which order does not matter.
    
    For example, if we define these revproxy rules (in any order):
      revproxy = /goo    http://www.worldofgoo.com     (1)
      revproxy = /       http://yaws.hyber.org         (2)
      revproxy = /erl    http://www.erlang.org         (3)
      revproxy = /google http://www.google.com         (4)
    
    then
      http://localhost will match the rule (2)
      http://localhost/goo will match the rule (1)
      http://localhost/google/search will match the rule (4)
      http://localhost/erl will match the rule (3)
    
    We also change how the matching is made. Now, the matching is done by
    splitting the path on slashes. So, using previous rules, "/google" is the
    longest prefix for the path "/google/test" and "/" is the longest prefix
    for "/erlang".
    capflam committed with vinoski Jun 27, 2012
  2. Handle undefined docroot when the fullpath of a request is built

    Now, the internal function yaws_server:construct_fullpath/3 returns
    'undefined' when there is no docroot. This might only happen for servers
    with an appmod on "/" (because docroot is optional in that case).
    
    Note that such appmods cannot return ssi or yssi structures.
    capflam committed with vinoski Jun 27, 2012
  3. loosen docroot checking for certain server configs

    For server configurations that define a reverse proxy, redirection for the
    path "/", forward proxies, or appmods on "/", a docroot isn't
    needed. Change yaws_config to avoid errors for missing docroot settings for
    such servers. Add test/t6 to check these configurations.
    vinoski committed Jun 25, 2012
Commits on Jun 26, 2012
  1. use localtime not universaltime for server_sent_events example

    Looks like httpd_util:rfc1123_date/1 wants local time, not UTC time, as its
    time argument. The server_sent_events example uses that function to create
    the server date string events.
    vinoski committed Jun 26, 2012
  2. Merge pull request #111 from tuncer/typo

    Fix trivial typo in server_sent_events.yaws
    vinoski committed Jun 26, 2012
Commits on Jun 25, 2012
  1. prepare for 1.94

    committed Jun 25, 2012
  2. add news items for upcoming 1.94

    vinoski committed Jun 25, 2012
  3. add support for W3C Server-Sent Events

    Server-Sent Events is a W3C working draft allowing servers to send simple
    events to a client. See the documentation in www/server_sent_events.yaws
    for a full description.
    vinoski committed Jun 1, 2012
Commits on Jun 24, 2012
  1. prepare for 1.94

    committed Jun 24, 2012
  2. The random patch for 1.93 wasn't good enough as discovered by Sergei …

    …Golovan, we need to cater for non printable chars
    committed Jun 24, 2012
Commits on Jun 21, 2012
  1. add reverse proxy intercept module capability

    Users can now specify an interception module that can rewrite requests and
    responses as they pass through the Yaws reverse proxy. See the
    documentation for details (yaws.conf.5 man page or the yaws.pdf file).
    
    Also add new set_header, get_header, and delete_header functions to the
    yaws_api module to allow intercept modules and arg rewriters to more easily
    examine and modify #headers{} records.
    
    Add new tests for the new header manipulation functions and for the reverse
    proxy interception feature.
    vinoski committed Jun 18, 2012
Commits on Jun 20, 2012
  1. preparing for 1.93

    committed Jun 20, 2012
  2. preparing for 1.93

    committed Jun 20, 2012
  3. preparing for 1.93

    committed Jun 20, 2012
  4. preparing for 1.93

    committed Jun 20, 2012
  5. Use crypto:rand_bytes() instead of the cryptogrphicalli weak random m…

    …odule. Swedish security consultant and cryptographer Kalle Zetterlund discovered a way to - given a sequence of cokkies produced by yaws_session_server - predict the next session id. Thus providing a gaping security hole into yaws servers that yse the yaws_session_server to maintain cookie based HTTP sessions
    committed Jun 20, 2012
Commits on Jun 19, 2012
  1. Merge pull request #110 from tuncer/reltool

    Simplify reltool.config
    vinoski committed Jun 19, 2012
Commits on Jun 18, 2012
  1. Simplify reltool.config

    tuncer committed Jun 18, 2012
Commits on Jun 16, 2012
  1. minor fixes to yaws.tex

    vinoski committed Jun 16, 2012
Commits on Jun 15, 2012
  1. make sure to always send proper strings to file:write() while logging

    Failure to send proper string to file:write() on FreeBSD could result in a
    emulator Bad value on output port 'efile' if bad data makes it there, say
    an atom.
    nicad committed with vinoski Jun 14, 2012
  2. default to a tcp queue backlog of 1024 (Nicolas Adiba)

    Default to a backlog of 1024 rather than the default 5 that TCP provides.
    vinoski committed Jun 15, 2012
  3. log debug messages to the error_logger for embedded mode (Nicolas Adiba)

    Log debug messages to the error_logger given that stdout is not available
    in embedded mode.
    vinoski committed Jun 15, 2012
Commits on Jun 13, 2012
Commits on Jun 11, 2012
  1. fix overfull hbox warnings in yaws.tex

    Fix overfull hboxes and also update some of the record definitions (like
    vinoski committed Jun 11, 2012
  2. Handle non-chunked responses without content-length in yaws_revproxy

    In that case, the revproxy must read until the backend closes.
    Add a test for this new functionality
    capflam committed with vinoski Jun 11, 2012
  3. Refactor yaws_revproxy when large non-chunked content is received

    Fix: srvconn_status must not be set to keep-alive
    Refactoring: prepare the handling of non-chunked responses with no
    content-length.
    capflam committed with vinoski Jun 11, 2012
  4. Fix conditions to close the backend socket when an error occurs

    We must close the socket when an error _OTHER_THAN_ 'closed' occurs.
    capflam committed with vinoski Jun 11, 2012
  5. handle large non-chunked content in yaws_revproxy

    Use partial_post_size as a block size to handle large non-chunked content
    from backend servers in yaws_revproxy. Read the content block by block,
    returning each block to the client as it arrives. This avoids having to
    read the entire backend response into memory before replying to the
    client. Add a test for this new functionality and fix .gitignore to ignore
    the new content file used for the test.
    vinoski committed Jun 11, 2012