Permalink
Commits on Dec 28, 2009
Commits on Dec 24, 2009
  1. bug fix: expect {Answer, ReqState} from webmachine_request:req_cookie…

    …/0 and :req_qs/0, not just Answer
    Bryan Fink committed Dec 24, 2009
Commits on Dec 21, 2009
  1. put incoming req_body in process dict

    (there is really no other decent way to allow more than one
    call to wrq:req_body in the same resource fun anymore)
    justin@basho.com committed Dec 21, 2009
  2. move body-fetched-yet test to outer state from reqdata

    also change record name so as to be able to make all modules
    using the reqstate record recompile to see the new record def.
    justin@basho.com committed Dec 21, 2009
Commits on Dec 15, 2009
  1. in wmtrace_resource, find webmachine install with code:lib_dir/1 inst…

    …ead of depending on it being in deps/webmachine
    Bryan Fink committed Dec 15, 2009
Commits on Dec 11, 2009
  1. trim the reqdata/reqstate loop in tracebacks

    justin@basho.com committed Dec 11, 2009
  2. do not double-pad the boundary

    justin@basho.com committed Dec 11, 2009
Commits on Dec 10, 2009
  1. quip update

    justin@basho.com committed Dec 10, 2009
  2. merge

    justin@basho.com committed Dec 10, 2009
Commits on Dec 8, 2009
  1. for wmtrace logging, don't dig more than one wm_reqdata/reqstate laye…

    …r deep
    Bryan Fink committed Dec 8, 2009
  2. error catching here does not help

    justin@basho.com committed Dec 8, 2009
  3. superfluous function

    justin@basho.com committed Dec 8, 2009
Commits on Dec 5, 2009
  1. add .manifest -> text/cache-manifest to guess_mime for serving HTML5 …

    …cache manifests
    
    add .svg -> image/svg+xml to guess_mime for serving SVG images
    Bryan Fink committed Dec 5, 2009
Commits on Dec 1, 2009
  1. Added a Write callable response method.

    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:
    
        -module(writefun_resource).
        -export([init/1, to_html/2]).
    
        -include_lib("webmachine/include/webmachine.hrl").
    
        init([]) -> {ok, undefined}.
    
        to_html(ReqData, State) ->
            MyBody = fun(Write) ->
                Write("<html><body><pre>"),
                lists:foreach(fun(_) ->
                    Write("Hello, new world\n"),
                    timer:sleep(100)
                end, lists:seq(1, 10)),
                Write("</pre></body></html>")
            end,
            {{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.
    davisp committed Dec 1, 2009
Commits on Nov 30, 2009
  1. 500 on exception in handle_req

    justin@basho.com committed Nov 30, 2009
  2. manage reqstate in 404

    justin@basho.com committed Nov 30, 2009
  3. parameterize parameterized modules

    justin@basho.com committed Nov 30, 2009
  4. removal of the request_srv process

    justin@basho.com committed Nov 30, 2009
Commits on Nov 20, 2009
  1. docstring fixes

    justin@basho.com committed Nov 20, 2009
Commits on Nov 8, 2009
Commits on Oct 27, 2009
  1. thanks, John

    justin@basho.com committed Oct 27, 2009
Commits on Oct 26, 2009
  1. add special case for complete lack of all host headers

    useful for netcat-style debugging
    Bryan Fink committed Oct 26, 2009
Commits on Oct 23, 2009
  1. host-based dispatching

    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}
    or
      [HostPart]
    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.
    
    Examples:
    
    {[], 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 example.com to root_resource and example.com/static to static_resource.
    
    {['*',"example","com"], [{[], root_resource, [x]},
                             {["static"], static_resource, [y]}]}.
    Will do the same as above, but also for any subdomains of example.com.
    
    {{[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.
    Bryan Fink committed Oct 23, 2009
Commits on Oct 21, 2009
  1. fix trace escape function to handle non-nil-terminated lists

    (they're valid data, and the dict module sometimes uses them)
    Bryan Fink committed Oct 21, 2009
Commits on Oct 13, 2009
  1. (via Dave Smith) avoid sending double empty chunk

    justin@basho.com committed Oct 13, 2009
Commits on Sep 25, 2009
  1. fix missing space in error msg, via Tuncer

    justin@basho.com committed Sep 25, 2009
Commits on Sep 21, 2009
  1. initial files for webmachine.basho.com site

    justin@basho.com committed Sep 21, 2009
Commits on Sep 11, 2009
  1. via Seth Falcon: encoding for PUT/POST response bodies

    justin@basho.com committed Sep 11, 2009
Commits on Sep 4, 2009
  1. quip update

    justin@basho.com committed Sep 4, 2009
  2. allow empty chunks in body streams

    justin@basho.com committed Sep 4, 2009
Commits on Aug 30, 2009