Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 34 lines (27 sloc) 0.931 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

<erl>


out(A) ->

    Peer = A#arg.client_ip_port,
    Req = A#arg.req,
    H = yaws_api:reformat_header(A#arg.headers),
    {ehtml,
     [{h5,[], "The headers passed to us were:"},
      {hr,[],[]},
      {ol, [],lists:map(fun(S) -> {li,[], {p,[],S}} end,H)},

      {h5, [], "The request"},
      {ul,[],
       [{li,[], f("method: ~s", [Req#http_request.method])},
        {li,[], f("path: ~p", [Req#http_request.path])},
        {li,[], f("version: ~p", [Req#http_request.version])}]},

      {hr,[],[]},
      {h5, [], "Other items"},
      {ul,[],
       [{li, [], f("Peer: ~p", [Peer])},
        {li,[], f("docroot: ~s", [A#arg.docroot])},
        {li,[], f("fullpath: ~s", [A#arg.fullpath])}]},
      {hr,[],[]},
      {h5, [], "Parsed query data"},
      {pre,[], f("~p", [yaws_api:parse_query(A)])},
      {hr,[],[]},
      {h5,[], "Parsed POST data "},
      {pre,[], f("~p", [yaws_api:parse_post(A)])}]}.

</erl>
Something went wrong with that request. Please try again.