restriction on message/data size when going through bluebox

Submit all your BlueBox related questions or report a bug here!

Moderators: Lapo, Bax

newbie2008
Posts: 8
Joined: 02 Apr 2008, 21:21

restriction on message/data size when going through bluebox

Postby newbie2008 » 02 Apr 2008, 21:27

Hi all,

I'm just testing out the eval. of Smart Fox 1.61 and we were testing out the bluebox functionality.

We seem to be getting an error on the client side when the server responds to a POST through bluebox:

TypeError: Error #1091: XML parser failure: Unterminated CDATA section.
at it.gotoandplay.smartfoxserver::SmartFoxClient/xmlReceived()
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleMessage()
at it.gotoandplay.smartfoxserver::SmartFoxClient/handleHttpData()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at it.gotoandplay.smartfoxserver.http::HttpConnection/handleResponse()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

It seems as though the response is being truncated. Is there a restriction on the size of the message/data which bluebox can handle? and if so, is this something that's configurable?
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 03 Apr 2008, 06:52

Hi,
there is no message size limit in the BlueBox but the server has a limit on the maximum size of incoming messages.
However this seems the opposite case, when the server sends data back to the client.
Could you give me more details about the message that you would expect when the error is fired?

Thank you
Lapo
--
gotoAndPlay()
...addicted to flash games
newbie2008
Posts: 8
Joined: 02 Apr 2008, 21:21

Postby newbie2008 » 03 Apr 2008, 22:56

I think we found what the problem was. We have embedded /n (newlines) within the data that we're sending back to the client. Unfortunately, SmartFoxClient.as is using that as a delimiter (function handleHTTPData) which causes it to prematurely terminate the message and hence causing the error mentioned above.

Is there anyway that this behavior can be modified by gotoandPlay? It's tough to guarantee that all data sent to the client will never contain any newlines.
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Apr 2008, 06:08

Hi,
there could be a problem with the url-encoding of the parameters. Are you using the AS 2.0 API ?
Is there anyway that this behavior can be modified by gotoandPlay? It's tough to guarantee that all data sent to the client will never contain any newlines.

Sure, just let me know which API version do you use.
Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
newbie2008
Posts: 8
Joined: 02 Apr 2008, 21:21

Postby newbie2008 » 04 Apr 2008, 06:37

Hi Lapo,

we're using the AS3 API.
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Apr 2008, 07:15

Thank you. We're taking a look and get back to you asap.
Stay tuned
Lapo

--

gotoAndPlay()

...addicted to flash games
newbie2008
Posts: 8
Joined: 02 Apr 2008, 21:21

Postby newbie2008 » 04 Apr 2008, 17:11

Thanks Lapo
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 07 Apr 2008, 17:26

Quick update: we have reproduced the problem and checked the flow of data. Data is handled correctly on the server side, so it looks like there's a bug in the client API. Tomorrow we're checking the API and I'll give you better details.
Stay tuned.
Lapo

--

gotoAndPlay()

...addicted to flash games
newbie2008
Posts: 8
Joined: 02 Apr 2008, 21:21

Postby newbie2008 » 08 Apr 2008, 22:42

Thanks for the update Lapo.
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 09 Apr 2008, 07:39

I didn't recall this immediately but the BlueBox can send 1 or more messages in one shot during a polling event.
As a separator for messages we chose to use the "\n" (new line character), so that's why you get broken data when you send that character within a single message.

As a workaround you could filter that character out or, if you really need to use it, encode it when sending the message and decode it back in the client. You could for example substitute it with a "$n" symbol or a similar combination.

I have added this to the fixes-list: we'll introduce a configurable separator character in order to avoid these problems in the future.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
newbie2008
Posts: 8
Joined: 02 Apr 2008, 21:21

Postby newbie2008 » 10 Apr 2008, 20:10

Thanks for the info Lapo. That's pretty much what we've done for now as a workaround.

Look forward to the customized delimiter.
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 11 Apr 2008, 05:07

Sure, it will be part of the next update.
Lapo

--

gotoAndPlay()

...addicted to flash games
dutzi
Posts: 12
Joined: 28 Jan 2008, 09:33

Postby dutzi » 04 Sep 2008, 08:32

I've downloaded the new version, and the bug still isn't fixed?
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Sep 2008, 08:46

The latest SFS 1.6.3 update does not contain a BlueBox update, sorry.
No critical bugs have been found since the last release so the next BlueBox update will come later this year.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 1 guest