1
0
Fork 0
liza/src
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
..
assert LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
bucket [DEV-2692] [BC-BREAK] Bucket stability and consistency fixes and non-term nulls 2017-09-06 09:03:45 -04:00
calc Calc: Add `index' method 2017-08-10 14:50:18 -04:00
client client: Truncate diff posted to server after first null 2018-03-07 13:46:05 -05:00
conf Add ConfStore 2017-08-29 14:34:41 -04:00
css StackedGroupUi: New group 2018-02-02 14:48:37 -05:00
dapi dapi: Do not perform static additions in invalid response data 2018-01-15 11:03:46 -05:00
data LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
field LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
group LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
program Extract bucket init code into ProgramInit 2017-08-30 11:20:19 -04:00
quote LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
server DslRater: Correct missing raters error message 2018-03-01 12:23:35 -05:00
sort LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
step LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
store Add DelimitedKey Store trait 2017-08-29 14:34:40 -04:00
system Client: Extract cmatch methods 2018-02-09 11:20:45 -05:00
test LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
ui Support default program id if none provided via URL 2018-03-01 12:23:35 -05:00
util LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
validate Cast value to string before validating 2017-06-29 14:18:01 -04:00
version.js.in Proper attribution for src/version.js.in 2016-03-29 14:35:59 -04:00