1
0
Fork 0
liza/doc
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
..
diagram LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
.gitignore .gitignore: Ignore *.t2p 2018-02-07 14:16:23 -05:00
Makefile.am doc/Makefile.am (liza_TEXINFOS): Add missing license.texi 2017-06-29 11:01:23 -04:00
assert.texi doc: Extract design sections into own chapters 2017-06-21 10:52:46 -04:00
bucket.texi Basic documentation for bucket diff 2017-09-06 09:04:27 -04:00
client.texi client: Truncate diff posted to server after first null 2018-03-07 13:46:05 -05:00
config.texi.in Add SRCURI configuration for manual 2017-03-23 12:16:52 -04:00
dapi.texi doc: Add beginning of dapi documentation 2017-06-21 10:52:46 -04:00
design.texi doc: Began server documentation 2017-06-22 13:07:30 -04:00
license.texi Add missing FDL text 2017-06-20 14:17:06 -04:00
liza.css doc: Add trivia macro 2018-02-06 11:33:34 -05:00
liza.texi doc: Began server documentation 2017-06-22 13:07:30 -04:00
macros.texi doc: Add @testrefjs macro 2018-03-07 13:40:08 -05:00
pred.texi doc/pred.texi: UI predicates are existential 2018-02-01 15:29:43 -05:00
program.texi doc: Begin documentation of DOM abstraction 2018-02-06 12:09:32 -05:00
server.texi doc: Fix bin/server reference under Server 2017-08-31 11:04:41 -04:00
validation.texi doc: Extract design sections into own chapters 2017-06-21 10:52:46 -04:00