Dec 12
Jolle Carlestam Confused by include_url handling of extended chars
Dec 12, 2012; 06:11
Jolle Carlestam
Confused by include_url handling of extended chars
We've stumbled upon an issue in regards to include_url that we've isolated to be a Lasso 9 problem.
If we use include_url to send json_serialized data containing non ASCII chars,like =C5=C4=D6=DC the content headers CONTENT_LENGTH is calculated wrong.. Basically counting each double byte char as a single byte. Because of the miscalculation it then cuts of the provided param prematurely.
Here's reproducible code:
sender.lasso
<?LassoScript
local(mymap = map("xc"= "=C5=C4=D6aao"))
local(myjson = json_serialize(#mymap))
include_url('http://boot.dev/dev/target.lasso',
-postparams = #myjson,
-verifypeer,
-string
)
'<hr />'
local(mymap = map("xc"= "AAOaao"))
local(myjson = json_serialize(#mymap))
include_url('http://xxx.yyy/target.lasso',
-postparams = #myjson,
-verifypeer,
-string
)
?>
target.lasso
<?LassoScript
web_request -> postString
?>
Result:
{"xc": "=C5=C4=D6aa
{"xc": "AAOaao"}
Notice how the first test chops of the end of the string. The cutting equals the number of double byte chars in the post param string.
Bypassing include_url and using the curl type directly gives the same result. Whereas constructing a curl call from the command line works.
So seems to be a Lasso 9 issue.
Comments?
HDB
Jolle
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Dec 12
Brad Lindsay Re: Confused by include_url handling of extended chars
Dec 12, 2012; 08:59
Brad Lindsay
Re: Confused by include_url handling of extended chars
Dec 12
Brad Lindsay Re: Confused by include_url handling of extended chars
Dec 12, 2012; 09:07
Brad Lindsay
Re: Confused by include_url handling of extended chars
Dec 12
=?iso-8859-1?Q?Kyle_J=E9ssup?= Re: Confused by include_url handling of extended chars
Dec 12, 2012; 09:55
=?iso-8859-1?Q?Kyle_J=E9ssup?=
Re: Confused by include_url handling of extended chars
Dec 12
=?iso-8859-1?Q?Kyle_J=E9ssup?= Re: Confused by include_url handling of extended chars
Dec 12, 2012; 10:04
=?iso-8859-1?Q?Kyle_J=E9ssup?=
Re: Confused by include_url handling of extended chars
Dec 12
=?iso-8859-1?Q?Kyle_J=E9ssup?= Re: Confused by include_url handling of extended chars
Dec 12, 2012; 10:14
=?iso-8859-1?Q?Kyle_J=E9ssup?=
Re: Confused by include_url handling of extended chars
Dec 12
=?iso-8859-1?Q?Kyle_J=E9ssup?= Re: Confused by include_url handling of extended chars
Dec 12, 2012; 10:21
=?iso-8859-1?Q?Kyle_J=E9ssup?=
Re: Confused by include_url handling of extended chars
Dec 12
=?iso-8859-1?Q?Kyle_J=E9ssup?= Re: Confused by include_url handling of extended chars
Dec 12, 2012; 10:48
=?iso-8859-1?Q?Kyle_J=E9ssup?=
Re: Confused by include_url handling of extended chars
Dec 13
Rick Draper RE: Confused by include_url handling of extended chars
Dec 13, 2012; 03:52
Rick Draper
RE: Confused by include_url handling of extended chars
Dec 12
Jolle Carlestam Re: Confused by include_url handling of extended chars
Dec 12, 2012; 19:31
Jolle Carlestam
Re: Confused by include_url handling of extended chars
Dec 12
Brad Lindsay Re: Confused by include_url handling of extended chars
Dec 12, 2012; 14:35
Brad Lindsay
Re: Confused by include_url handling of extended chars
Dec 12
Kyle Jessup Re: Confused by include_url handling of extended chars
Dec 12, 2012; 14:47
Kyle Jessup
Re: Confused by include_url handling of extended chars
Dec 12
Jolle Carlestam Re: Confused by include_url handling of extended chars
Dec 12, 2012; 20:28
Jolle Carlestam
Re: Confused by include_url handling of extended chars
Dec 13
Frank Filippone Re: Confused by include_url handling of extended chars
Dec 13, 2012; 10:24
Frank Filippone
Re: Confused by include_url handling of extended chars
Dec 13
Kyle Jessup Re: Confused by include_url handling of extended chars
Dec 13, 2012; 09:51
Kyle Jessup
Re: Confused by include_url handling of extended chars
Dec 13
Jolle Carlestam Re: Confused by include_url handling of extended chars
Dec 13, 2012; 15:15
Jolle Carlestam
Re: Confused by include_url handling of extended chars