public
Description: A new revision of Fuzed, the Erlang-based frontend for web apps. Check out the mailing list at http://groups.google.com/group/fuzed
Clone URL: git://github.com/KirinDave/fuzed.git
Search Repo:
Requests moving through and bubbling back out but not responding.
KirinDave (author)
Sun May 11 16:48:27 -0700 2008
commit  7a31d04b79501e964321222077a5bd630cf5bebe
tree    0c4e979f9c5a704cc19df057f393910e9099ce76
parent  84159d727f2ae308bcb1518c66420e17e790bec7
...
5
6
7
8
 
9
10
11
12
13
...
21
22
23
24
 
25
26
27
28
29
30
 
31
32
 
33
34
35
...
45
46
47
48
 
49
50
51
52
...
74
75
76
77
 
78
79
 
80
81
82
...
5
6
7
 
8
9
10
11
12
13
...
21
22
23
 
24
25
26
27
28
29
 
30
31
 
32
33
34
35
...
45
46
47
 
48
49
50
51
52
...
74
75
76
 
77
78
 
79
80
81
82
0
@@ -5,7 +5,7 @@
0
 -compile(export_all).
0
 
0
 out404(A, _GC, SC) ->
0
- Parameters = {struct, parse_arg(A, SC)},
0
+ Parameters = [{method, handle_request}, {request, {struct, parse_arg(A, SC)}}],
0
   io:format("Param restructure:~n~p~n", [Parameters]),
0
   case node_api:safely_send_call_to_pool(handle_request,
0
                                          Parameters,
0
0
0
@@ -21,15 +21,15 @@
0
 
0
 parse_arg(Request, ServerOptions) ->
0
   Headers = Request#arg.headers,
0
- {convert_method(Request),
0
+ [convert_method(Request),
0
    convert_version(Request),
0
    convert_querypath(Request),
0
    {querydata, prep(Request#arg.querydata)},
0
    {servername, prep(ServerOptions#sconf.servername)},
0
    {headers, {struct, convert_headers(Request#arg.headers)}},
0
- {cookies, {array, list_to_tuple(lists:map(fun(X) -> prep(X) end, Headers#headers.cookie))}},
0
+ {cookies, {array, lists:map(fun(X) -> prep(X) end, Headers#headers.cookie)}},
0
    {pathinfo, prep(ServerOptions#sconf.docroot)},
0
- {postdata, Request#arg.clidata}}.
0
+ {postdata, Request#arg.clidata}].
0
     
0
 
0
 convert_method(Request) ->
0
@@ -45,7 +45,7 @@
0
 convert_version(Request) ->
0
   R = Request#arg.req,
0
   {http_request,_Method,{_Type,_Path},Version} = R,
0
- {http_version, Version}.
0
+ {http_version, {array, tuple_to_list(Version)}}.
0
 
0
 convert_req(R) ->
0
   {http_request,Method,{_Type,Path},_} = R,
0
0
@@ -74,9 +74,9 @@
0
   SpecialHeaders =
0
     lists:map(fun({http_header, _Len, Name, _, Value}) -> {prep(Name), prep(Value)} end,
0
               A#headers.other),
0
- list_to_tuple([{Name, Res} || {Name, Res} <- NormalHeaders, Res /= undefined] ++ SpecialHeaders).
0
+ [{Name, Res} || {Name, Res} <- NormalHeaders, Res /= undefined] ++ SpecialHeaders.
0
 
0
-convert_response(EhtmlTuple) ->
0
+convert_response({response, EhtmlTuple}) ->
0
   {Status, AllHeaders, Html} = EhtmlTuple,
0
   {allheaders, HeaderList} = AllHeaders,
0
   ProcessedHeaderList = lists:map(fun({header, Name, Value}) -> {header, [binary_to_list(Name) ++ ":", binary_to_list(Value)]} end,

Comments

    No one has commented yet.