Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003804 [Hessian] minor always 12-08-09 09:18 12-17-09 18:21
Reporter emil View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 4.0.2
Summary 0003804: hessian flash long strings
Description (rep by Piet van Remortel)

We are trying to fix an unexplainable error in communicating between java
(hessian 4.0.2) and flex (hessian 4.0.0). For some input files we get a
"expected string at XX" where XX is a position number. Digging into the code,
we find that this seems like a wrong or unexpected code coming in when reading
characters. Is this a version mismatch ? If so, is there a plan to push the
flex version to 4.0.2 also ?

...


We stepped through the code and noticed the following: We typically transmit
long files consisting of strings (XML). Whenever such a file is chopped up in
blocks of 0x8000 size, the following can happen, making things go wrong:

When a string's length is a multiple of 0x8000, plus a tail that is less then
0x0400, the tail gets misread in the parseChar() method, since there is no case
clause capturing BC_STRING_SHORT.

The following adaptation of parseChar() in Hessian2Input fixes this:
(Actionscript version given - analogous for Java)

//=========

...

_isLastChunk = true;

_chunkLength = code - 0x00;


break;


// fix start ==============

case Hessian2Constants.BC_STRING_SHORT:

case Hessian2Constants.BC_STRING_SHORT + 1:

case Hessian2Constants.BC_STRING_SHORT + 2:

_isLastChunk = true;

_chunkLength = ((code - Hessian2Constants.BC_STRING_SHORT) << 8) + read();

break;

// fix end ================


default:

throw expect("string", code);

}

}
_chunkLength--;


return parseUTF8Char();

}

//=========
Additional Information
Attached Files

- Relationships

- Notes
(0004350)
emil
12-17-09 18:21

Hessian2InputOutputTests - 0x8000 + 0x400 String: "a" * 0x8400
 

- Issue History
Date Modified Username Field Change
12-08-09 09:18 emil New Issue
12-17-09 02:25 Marian Kolesar Issue Monitored: Marian Kolesar
12-17-09 18:21 emil Status new => closed
12-17-09 18:21 emil Note Added: 0004350
12-17-09 18:21 emil Resolution open => fixed
12-17-09 18:21 emil Fixed in Version  => 4.0.3


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker