Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Dec 28, 2009
  1. @beerriot
Commits on Dec 24, 2009
  1. @beerriot

    bug fix: expect {Answer, ReqState} from webmachine_request:req_cookie…

    beerriot authored
    …/0 and :req_qs/0, not just Answer
Commits on Dec 21, 2009
  1. put incoming req_body in process dict authored
    (there is really no other decent way to allow more than one
    call to wrq:req_body in the same resource fun anymore)
  2. move body-fetched-yet test to outer state from reqdata authored
    also change record name so as to be able to make all modules
    using the reqstate record recompile to see the new record def.
Commits on Dec 15, 2009
  1. @beerriot

    in wmtrace_resource, find webmachine install with code:lib_dir/1 inst…

    beerriot authored
    …ead of depending on it being in deps/webmachine
  2. @beerriot
Commits on Dec 11, 2009
  1. trim the reqdata/reqstate loop in tracebacks authored
  2. do not double-pad the boundary authored
Commits on Dec 10, 2009
  1. quip update authored
  2. merge authored
Commits on Dec 8, 2009
  1. @beerriot
  2. @beerriot
  3. error catching here does not help authored
  4. superfluous function authored
Commits on Dec 5, 2009
  1. add .manifest -> text/cache-manifest to guess_mime for serving HTML5 …

    Bryan Fink authored
    …cache manifests
    add .svg -> image/svg+xml to guess_mime for serving SVG images
Commits on Dec 1, 2009
  1. @davisp

    Added a Write callable response method.

    davisp authored
    Body producing functions can return {writer, fun my_callable/1} as the status to indicate that they would like a fun write/1 callable passed to that function. This callable can then be used to write data to the client.
    An example:
        -export([init/1, to_html/2]).
        init([]) -> {ok, undefined}.
        to_html(ReqData, State) ->
            MyBody = fun(Write) ->
                lists:foreach(fun(_) ->
                    Write("Hello, new world\n"),
                end, lists:seq(1, 10)),
            {{writer, MyBody}, ReqData, State}.
    Using a write callable like this allows our body producing functions to avoid the resumable properties currently required by the {stream, Callable} methods.
Commits on Nov 30, 2009
  1. 500 on exception in handle_req authored
  2. manage reqstate in 404 authored
  3. @beerriot
  4. parameterize parameterized modules authored
  5. removal of the request_srv process authored
Commits on Nov 20, 2009
  1. docstring fixes authored
Commits on Nov 8, 2009
Commits on Oct 27, 2009
  1. thanks, John authored
Commits on Oct 26, 2009
  1. @beerriot

    add special case for complete lack of all host headers

    beerriot authored
    useful for netcat-style debugging
Commits on Oct 23, 2009
  1. @beerriot

    host-based dispatching

    beerriot authored
    dispatch rules can now take two different forms:
    The old form: {PathMatchSpec, Module, Paramters}
    The new form: {HostMatchSpec, [{PathMatchSpec, Module, Parameters}]}
    The former is equivalent to the latter with HostMatchSpec={['*'],'*'}
    HostMatchSpec is matched against one of (in order of preference):
      X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Server, Host
    HostMatchSpec can have two forms:
      {[HostPart], PortSpec}
    The latter is equivalent to the former with PortSpec='*'
    The list of host parts is matched against the hostname extracted from a header in much the same way that PathMatchSpec is matched against the path.
    {[], root_resource, [x]}.
    {['*'], [{[], root_resource, [x]}]}.
    {{['*'],'*'}, [{[], root_resource, [x]}]}.
    Will each match the root path of any host.
    {["example","com"], [{[], root_resource, [x]},
                         {["static"], static_resource, [y]}]}.
    Will dispatch the root of to root_resource and to static_resource.
    {['*',"example","com"], [{[], root_resource, [x]},
                             {["static"], static_resource, [y]}]}.
    Will do the same as above, but also for any subdomains of
    {{[host,"local"], 8000}, [{[], res_A, [x]}]}.
    {{[host,"local"], 8001}, [{[], res_B, [x]}]}.
    Will dispatch requests to ?.local:8000/ to res_A and requests to ?.local:8001/ to resB, binding the host part immediately preceeding ".local" to 'host', such that wrq:get_path_info(host, ReqData) would return the matched string.
Commits on Oct 21, 2009
  1. @beerriot

    fix trace escape function to handle non-nil-terminated lists

    beerriot authored
    (they're valid data, and the dict module sometimes uses them)
Commits on Oct 13, 2009
  1. (via Dave Smith) avoid sending double empty chunk authored
Commits on Sep 25, 2009
  1. fix missing space in error msg, via Tuncer authored
Commits on Sep 21, 2009
  1. initial files for site authored
Commits on Sep 11, 2009
  1. via Seth Falcon: encoding for PUT/POST response bodies authored
Commits on Sep 4, 2009
  1. quip update authored
  2. allow empty chunks in body streams authored
Commits on Aug 30, 2009
  1. @argv0
Something went wrong with that request. Please try again.