[FIXED][B3RC4] Maniascript : CreateGet url truncated ?
Posted: 17 Feb 2013, 15:35
Yesterday i made a big test on WorldRecords with a lot of players in Stunters Title Pack (before officialy activate this feature)
I discovered this strange issue
This is the portion of code i'm using for sending informations to stunters database each time a player reach finish line
for log("PlayerFinish URL : "^urlTxt);, the urlTxt variable is complete and ok in maniaplanetserver log file.
in http server log, url is truncated. : end of url : &nickname=blablabla&serverlogin=stunt
there is missing "ers" of stunters, and, when url is bigger (with bigger figurelist), then nickname is truncated too.
At start i thought the problem come from http server, then i tested to put the complete url in http browser (chrome), and all is ok with same or bigger url.
I think HttpRequest::CreateGet(urlTxt); truncate url before posting to http server...
Thx
Edit : tested with CreatePost(urlTxt, ""); and same issue...
by the way, with CreatePost, in php, I have to get the posted variables with $_GET and not $_POST
I discovered this strange issue
This is the portion of code i'm using for sending informations to stunters database each time a player reach finish line
Code: Select all
Text HackServerLogin()
{
return "stunters";
}
Void PlayerFinish(CTmModeEvent _Event)
{
declare Text Interface for UIManager.UIAll;
declare _Player <=> _Event.Player;
declare Text JSONFigures for _Player = "";
if (Http.SlotsAvailable > 0)
{
declare urlTxt = "http://xxxx.xxxx.xxx/?enviro=" ^ Environment();
urlTxt ^= "&interface=" ^ Interface;
urlTxt ^= "&mapuid=" ^ Map.Id;
urlTxt ^= "&login=" ^ _Player.Login;
urlTxt ^= "&score=" ^ _Player.CurRace.StuntsScore;
urlTxt ^= "&distance=" ^ _Event.Distance;
urlTxt ^= "&timeplayed=" ^ (Now - _Player.RaceStartTime);
urlTxt ^= "&figures=[" ^ JSONFigures ^ "]";
urlTxt ^= "&language="^_Player.User.Language;
urlTxt ^= "&zonepath=" ^ TextTools::UrlEncode(_Player.User.ZonePath);
urlTxt ^= "&nickname=" ^ TextTools::UrlEncode(_Player.User.Name);
if(Interface == "multi")
{
urlTxt ^= "&serverlogin=" ^ HackServerLogin();
}
else if(Interface == "solo")
{
urlTxt ^= "&serverlogin=";
}
log("PlayerFinish URL : "^urlTxt);
HttpReqs[_Player.Login] = Http.CreateGet(urlTxt);
}
else
{
log(Interface ^ " PlayerFinish() : NO HTTP SLOTS AVAILABLE !!!");
}
}
for log("PlayerFinish URL : "^urlTxt);, the urlTxt variable is complete and ok in maniaplanetserver log file.
in http server log, url is truncated. : end of url : &nickname=blablabla&serverlogin=stunt
there is missing "ers" of stunters, and, when url is bigger (with bigger figurelist), then nickname is truncated too.
At start i thought the problem come from http server, then i tested to put the complete url in http browser (chrome), and all is ok with same or bigger url.
I think HttpRequest::CreateGet(urlTxt); truncate url before posting to http server...
Thx

Edit : tested with CreatePost(urlTxt, ""); and same issue...
by the way, with CreatePost, in php, I have to get the posted variables with $_GET and not $_POST
