1
0
Fork 0
liza/test
Mike Gerwitz c33adee21d client: Truncate diff posted to server after first null
Before this change, since `undefined' is encoded as `null' when serialized,
there was no way for the server to disambiguate between unmodified values
and a truncation point.  For example:

  [ undefined, undefined, null, null, null ]

The above array represents two unmodified and three removed indexes.  But
this is serialzed into JSON as:

  [ null, null, null, null, null ]

It isn't possible for the server to determine what the truncation point is
from that diff.  The solution is to therefore truncate the array _before_
sending it to the server, providing a trailing null to indicate that a
truncation has occurred:

  [ null, null, null ]

The above means that the first two indexes are unmodified, and that index 2
and later should all be truncated.

* doc/client.texi (Saving to Server): New section.
* src/client/transport/XhttpQuoteTransport.js (_truncateDiff): New method to
  perform truncation.
  (getBucketDataJson): Use it.
* test/client/transport/XhttpQuoteTransportTest.js: New file with respective
  test case.
2018-03-07 13:46:05 -05:00
..
bucket [DEV-2692] [BC-BREAK] Bucket stability and consistency fixes and non-term nulls 2017-09-06 09:03:45 -04:00
client client: Truncate diff posted to server after first null 2018-03-07 13:46:05 -05:00
conf Add ConfLoader 2017-08-28 09:07:28 -04:00
dapi [BC BREAK] DataApi config lookup 2017-08-29 15:11:28 -04:00
event ValueSetEventHandler: New handler for `set' event 2018-02-07 14:59:50 -05:00
program Extract bucket init code into ProgramInit 2017-08-30 11:20:19 -04:00
server [DEV-2692] [BC-BREAK] Bucket stability and consistency fixes and non-term nulls 2017-09-06 09:03:45 -04:00
store Add DelimitedKey Store trait 2017-08-29 14:34:40 -04:00
system LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
ui LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
validate LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
pre.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00