Dan Mills
5e07cb98d5
Don't allow re-entrance! Fail to lock when we already hold a lock.
2008-06-17 18:01:48 +09:00
Dan Mills
5c196a641a
treat paths beginning with '/' as absolute
2008-06-17 09:51:02 +09:00
Dan Mills
a8ad7d2804
merge upstream changes
2008-06-15 13:42:10 +09:00
Atul Varma
92583fc5ff
Fixed an 'outstanding callbacks' warning and simplified the code a tiny bit.
2008-06-13 15:39:06 -07:00
Myk Melez
b12f3d03db
use nsIXMLHttpRequest::mozBackgroundRequest instead of DummyAuthProvider to suppress authentication dialogs and ensure XMLHttpRequests succeed even when the window that originated the request goes away
2008-06-13 13:08:36 -07:00
Dan Mills
589f3222eb
To avoid some async.js warnings: Turn some 'yield' calls into 'return' ones, and don't call 'self.cb' twice in a row when constructing event listeners for XHRs.
2008-06-13 15:49:18 +09:00
Atul Varma
813c1abb3f
Added a POST method to dav.js.
2008-06-09 17:36:54 -07:00
Atul Varma
53f7206dec
Just added a few semicolons that js2-mode warned me about.
2008-06-09 09:45:55 -07:00
Dan Mills
88bafd3245
Add and start using an object to represent a remote resource (file), and a server object to hold them. Resources will attempt to retry network operations if they fail.
2008-05-28 20:11:39 -07:00
Dan Mills
2c39623eab
DAV: separate the root url of the DAV repository from the default prefix for all operations (i.e., the user's subdirectory)
2008-05-15 18:08:13 -07:00
Dan Mills
63af6c5dbd
service: remove accidental 'resetServer' call in sync (\!); dav: lock a file called 'lock', instead of the entire collection (workaround for bug 421610)
2008-04-16 14:46:57 -07:00
Dan Mills
83fd7d6261
Various improvements:
...
* async generators: much better stack traces
* dav: use global identity system rather than login/logout to manage
usernames and passwords.
* dav: there is a checkLogin() instead of login() which can be used to
verify auth at any time.
* dav: make it so that we can (only internally atm) hold multiple
locks for different URLs.
* identity: add an identity manager singleton service to keep
identities globally, referenced by a name, with aliasing support (so
e.g., dav can ask for the 'dav' identity, while something else can
alias 'dav' to another identity).
* service: keep track of logged in status here, rather than in the dav
service. Use the global id manager.
2008-04-10 21:38:15 -07:00
Dan Mills
a4b0ed4a6e
make login more robust, specially work around first-login oddities with services.m.c
2008-04-01 23:43:14 -07:00
Dan Mills
a5bb6bf61f
[mostly] beat login dialog into submission; use DAV singleton instead of making a new DAVCollection in service.js; split up checks from login into their own functions, call them on sync(); check we are logged in before syncing
2008-03-31 07:20:09 -07:00
Dan Mills
acdfa5a921
use the wrapper notifier for login(), change observers to the slightly different observer topics; allow server url to not have a trailing slash (add one automatically); dial down dav.js verbosity; add serverWipe service method; change 'reset server data' button in prefs pane to do serverWipe instead of resetServer; allow for wrappers to have extra args both saved in the closure (at wrap creation time) as well as passed in later (via .async())
2008-03-30 08:40:23 -07:00
Dan Mills
cfbb3a75b1
remove old '500 error' hack for services.m.c during mkcol; fix applyCommands to do async right & make a listener correctly
2008-03-26 23:51:01 -07:00
Dan Mills
1b3916bc83
make XHRs non-blocking again; change sharing dialog so sharing is done without closing the dialog (still lacks any feedback though)
2008-03-26 23:22:35 -07:00
Dan Mills
24ba577b6f
improve async generator logging; don't call done() on StopIteration when we already have a timer set (it means the generator just 'bottomed out' after calling done()); make XHRs be synchronous (blocking) - temporarily; fix up sharing code (adding to the keyring)
2008-03-26 00:59:34 -07:00
Dan Mills
0a4be048f7
make service.js the main entry point from chrome/content; make the service be lazy-loaded; make crypto be lazy-loaded
2008-03-25 15:14:00 -07:00
Dan Mills
16920cd2ae
Various improvements:
...
* Logging improvements / default log levels tweaked. Less chatty now.
Ability to tweak log levels of individual loggers via prefs.
* Various crypto module fixes, specially for RSA.
* 'service' lock removed, reuses server lock now. dav module supports
temporarily blocking locks to simulate the 'service' lock (login()
needs this, since dav is not configured at that time).
* PKI support: data encryption uses randomly-generated symmetric keys,
which are then encrypted with RSA public keys and stored on the
server.
2008-03-19 15:17:04 -07:00
Dan Mills
48733f699a
add a dav method for getting a list of server files/directories; delete all server data when private key isn't found (this will cause everyone's server data to get wiped, since no one has a key yet); fix a bug in checkStatus with specific status codes (as opposed to ranges)
2008-03-07 04:20:55 -08:00
Dan Mills
941dd24c3b
Asynchronous generator helpers rework + PKI work
...
* Async helpers are in a module of their own now
* Async routines have simpler semantics now. onComplete handlers are taken care of by the helpers. Exceptions are bubbled up across nested asynchronous generators
* Stack traces are automatically logged for unhandled exceptions
* Async generators are now allowed to 'bottom out' (StopIteration is ignored) - this is configurable.
* RSA key generation fixes
* On login we now create an RSA keypair, encrypt the private one with PBE, and upload them to the server
* Log files are now limited to 2MB (down from 5)
2008-03-07 01:56:36 -08:00
Dan Mills
c1f8acb964
switch to nsIJSON for JSON parsing and output. add a deepCopy function instead of using eval(uneval()). make *sure* to read and write UTF-8 to files. bump version
2008-03-05 00:00:56 -08:00
Dan Mills
d6b5a9fc29
put utility functions in an object to avoid namespace pollution
2008-02-13 14:30:44 -08:00
Dan Mills
2883ed0621
Make {en,de}cryption asynchronous so as to not block the UI; fix 'xxxtea' typos (it's xxtea); fix auth header suppression
2007-12-26 17:40:46 -08:00
Dan Mills
c3f4b08ffc
Fix typo in last commit; use asterisks in place of auth header
2007-12-26 14:51:52 -08:00
Dan Mills
6dfb3eae28
Bug 409673: Don't log the authentication header
2007-12-26 14:49:03 -08:00
Dan Mills
6782f99ad3
login fixes; history sync fixes; make reset client actually delete all client data (useful for testing and for syncing down server data - e.g. the restore case)
2007-12-19 13:24:31 -08:00
Dan Mills
516dfc2930
some more cleanup/refactoring; add history engine/core/store (history sync\!)
2007-12-14 18:07:25 -08:00
Dan Mills
f9df1f57a8
assume in loaded modules that the resource:// alias has already been added - remove all the templatey code to do that
2007-12-11 11:57:13 -08:00
Dan Mills
e44b47a493
more and more refactoring: split weave module into multiple files (finally!)
2007-12-10 21:38:53 -08:00