Mantis - Hessian
Viewing Issue Advanced Details
2823 minor always 08-05-08 10:23 08-13-08 15:50
ferg  
ferg  
normal  
closed  
fixed  
none    
none 3.2.1  
0002823: hessian 2 vector length
(rep by Niclas Olofsson)


x6e is followed by the int production. So a length of 0 would be

  x6e x90

Or

  x6e I(cap-i) b3 b2 b1 b0

The int production encodes the number of bytes.

The java implementation uses this in Hessian2Output.

        if (length < 0) {
        } else if (length < 0x100) {
            _buffer[_offset++] = (byte) (LENGTH_BYTE);
            _buffer[_offset++] = (byte) (length);
        } else {
            _buffer[_offset++] = (byte) ('l');
            _buffer[_offset++] = (byte) (length >> 24);
            _buffer[_offset++] = (byte) (length >> 16);
            _buffer[_offset++] = (byte) (length >> 8);
            _buffer[_offset++] = (byte) (length);
        }

That has to be a bug, right? Also, all examples about this is wrong in
the spec .. but the grammar spec in the beginning of the spec is
correct. However, using that encoding will not work with the server.


Notes
(0003328)
ferg   
08-13-08 15:50   
hessian/3bh-