TiddlyWiki5/core/modules
FND 6505e6f448 WebDAV file overwrite protection (#2614)
* putSaver: detect edit conflicts to prevent clobbering, if possible

if the server supplies an ETag, we send it back when saving, allowing
the server to detect edit conflicts and respond with 412 (cf.
https://www.w3.org/1999/04/Editing/)

caveats:
* this only kicks in after the first save, as we don't have access to
  the ETag when first loading the document
* there's no recovery mechanism (e.g. resetting `this.etag` in order to
  force clobbering), other than manually reloading the document

* putSaver: retrieve ETag upon initialization for clobbering protection

this addresses one of the caveats from the previous commit
(2d75cb83af) - while theoretically prone
to a race condition, it seems unlikely that saving will be triggered
before the server responds

* putSaver: simplify URI extraction

this simplifies the approach introduced in
f51f6bf774, with the purpose of removing
the fragment identifier

* putSaver: localize error message

* putSaver: switch to built-in HTTP helper

in the process, fixed ETag assignment in `#save` method (was
`this.etag`, now `self.etag`) as well as a syntax error due to a missing
closing brace

* putSaver: consolidate URI handling
2017-02-17 12:26:15 +00:00
..
commands Put request handler on SimpleServer.prototype (#2627) 2016-12-17 15:06:10 +00:00
editor Refresh simple editor when empty text, e.g. hitting ENTER (#2702) 2017-01-09 10:31:40 +00:00
filters Add new "count" filter operator 2017-02-08 20:11:44 +00:00
info Expose document location via $:/info/url/* info tiddlers 2016-10-18 09:12:55 +01:00
macros Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
parsers Add support for other movie content types 2016-12-23 08:34:07 +00:00
savers WebDAV file overwrite protection (#2614) 2017-02-17 12:26:15 +00:00
startup Add page print button 2016-10-20 09:44:52 +01:00
storyviews Revert getTiddlerData() and add getTiddlerDataCached() 2015-07-10 16:43:50 +01:00
upgraders Revert getTiddlerData() and add getTiddlerDataCached() 2015-07-10 16:43:50 +01:00
utils Major refactoring of filesystemadaptor 2017-02-11 12:56:42 +00:00
widgets Add several new hooks for UI actions 2017-02-09 15:42:55 +00:00
commander.js Improve error message for missing commands 2014-11-09 14:49:33 +00:00
config.js Move the wikilink regexps into global config 2014-11-26 11:12:25 +00:00
deserializers.js Trap JSON syntax errors during import 2016-10-13 14:16:55 +01:00
filters.js Removed unused vars + some whitespace (#2106) 2016-10-08 13:32:14 +01:00
keyboard.js Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
language.js Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
pluginswitcher.js Add experimental support for RTL languages 2016-08-15 19:47:26 +01:00
saver-handler.js Rename variable for clarity 2017-02-04 17:24:25 +00:00
story.js Fix issues with creation and modification dates 2015-09-11 13:34:01 +01:00
syncer.js Remove obsolete code 2017-02-04 18:14:20 +00:00
tiddler.js More resilience to Tiddler.isEqual() 2014-11-09 21:47:00 +00:00
wiki-bulkops.js Add several new hooks for UI actions 2017-02-09 15:42:55 +00:00
wiki.js Add wiki.checkTiddlerText() convenience method 2017-02-09 15:43:28 +00:00