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
35
36
37
38
|
[
define_tag:'lp_client_params',
-description='Returns an array of GET/POST parameters passed from the client.',
-priority='replace',
-optional='method';
local:'out' = array;
if: (local:'method') == 'GET';
#out->(merge: client_getparams);
else: (local:'method' == 'POST');
#out->(merge: client_postparams);
else; // both
#out->(merge: client_getparams);
#out->(merge: client_postparams);
/if;
// correct charset issue in LP8.5.5
if: client_encoding != content_encoding;
local('i'=null,'name'=null,'value'=null);
iterate: #out, #i;
if: #i->type == 'pair';
#name = (bytes:#i->name,client_encoding);
#value = (bytes:#i->value,client_encoding);
#i = (pair: #name->(exportstring:content_encoding) = #value->(exportstring:content_encoding));
else;
#name = (bytes:#i,client_encoding);
#i = #name->(exportstring:content_encoding);
/if;
/iterate;
/if;
return:#out;
/define_tag;
]
|