KangoExtensions / kango

Kango framework issue tracker
74 stars 7 forks source link

XHR | Are there any limit length of params in sending a request? #102

Closed ghost closed 10 years ago

ghost commented 10 years ago

Dear buddy,

Thanks for your great work, but I encountered a problem with Kango.xhr API. I tried to send a message with encoded data to my server. But I got a truncated data, so I cannot decode it.

This is my code in Content Script. It's a web crawling extension

var details = {
    method : 'POST',
    url : Config.baseUrl,
    async : true,
    params : params,
    contentType : 'json'
};

kango.xhr.send(details, function (data) {
    kango.console.log(data);
});

And this is my params which collected from form, and then JSON encode.

params = {
         // more data...
         skills: "[{"name":"Business Strategy","score":0},{"name":"Leadership","score":0},{"name":"Strategy","score":0},{"name":"Entrepreneurship","score":0},{"name":"Product Marketing","score":0},{"name":"Strategic Planning","score":0},{"name":"Executive Management","score":0},{"name":"Product Development","score":0},{"name":"LinkedIn","score":0},{"name":"Product Management","score":0},{"name":"Social Media","score":0},{"name":"User Experience","score":0},{"name":"Corporate Development","score":0},{"name":"Non-profits","score":0},{"name":"Mergers & Acquisitions","score":0},{"name":"Analytics","score":0},{"name":"Team Leadership","score":0},{"name":"Thought Leadership","score":0},{"name":"Business Operations","score":0},{"name":"Leadership Development","score":0},{"name":"Nonprofits","score":0},{"name":"Awesomeness","score":0},{"name":"Motivation","score":0},{"name":"Mentoring","score":0},{"name":"Education","score":0},{"name":"Mobile Applications","score":0},{"name":"","score":0}]",
         // more data...
}

This is POST data I got in server (PHP)

"[{"name":"Business Strategy","score":0},{"name":"Leadership","score":0},{"name":"Strategy","score":0},{"name":"Entrepreneurship","score":0},{"name":"Product Marketing","score":0},{"name":"Strategic Planning","score":0},{"name":"Executive Management","score":0},{"name":"Product Development","score":0},{"name":"LinkedIn","score":0},{"name":"Product Management","score":0},{"name":"Social Media","score":0},{"name":"User Experience","score":0},{"name":"Corporate Development","score":0},{"name":"Non-profits","score":0},{"name":"Mergers "

I don't know why. I switched to use jQuery via $.post, this bug didn't occur, but sometime it cannot resolve the cross-domain issue.

Please help me. Thanks so much.

akrylysov commented 10 years ago

Hello, what is your browser name, version and OS?

akrylysov commented 10 years ago

Can't reproduce the issue. Tried on 50 MB data.