--
You received this message because you are subscribed to the Google Groups "jsdav" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdav+un...@googlegroups.com.
var jsDAV = require("jsDAV");
jsDAV.debugMode = true;
var File = require("jsDAV/lib/DAV/file");
var MyFile = File.extend({
initialize: function(path) {
console.log("myFile > initialize");
this.path = path;
},
getName: function() {
console.log("myFile > getName");
return "Hello World";
},
"get": function() {
console.log("myFile > get");
return (new Buffer("Hello"));
},
getSize: function() {
console.log("myFile > getSize");
return 5;
},
getETag: function() {
console.log("myFile > getETag");
return null;
}
});
var Directory = require("jsDAV/lib/DAV/collection");
var myDirectory = Directory.extend({
initialize: function(path) {
console.log("myDirectory > initialize");
this.path = path;
},
getChildren: function() {
console.log("myDirectory > getChildren");
return (new Array());
},
getChild: function(name) {
console.log("myDirectory > getChild");
return MyFile.new("Hello World");
},
childExists: function(name) {
console.log("myDirectory > childExists");
return true;
},
getName: function() {
console.log("myDirectory > getName");
return "Hello World";
}
});
var server = jsDAV.createServer({node: myDirectory.new("eenMap")}, 8000);
myDirectory > initialize
[info] jsDAV server running on http://127.0.0.1:8000
[info] {1} OPTIONS /
[info] {1} { host: '127.0.0.1:8000',
[info] accept: '*/*',
[info] 'content-length': '0',
[info] connection: 'close',
[info] 'user-agent': 'WebDAVLib/1.3' }
[info] Receiving headers: {"host":"127.0.0.1:8000","accept":"*/*","content-length":"0","connection":"close","user-agent":"WebDAVLib/1.3"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {1} 200 { Allow: 'OPTIONS,GET,HEAD,DELETE,PROPFIND,PUT,PROPPATCH,COPY,MOVE,REPORT',
[info] 'MS-Author-Via': 'DAV',
[info] 'Accept-Ranges': 'bytes',
[info] 'X-jsDAV-Version': '0.3.2',
[info] 'Content-Length': 0,
[info] DAV: '1,3,extended-mkcol,2' }
[info] {1} ''
^Cmbp-van-damiaan:KHLfiles Damiaan$ node server
myDirectory > initialize
[info] jsDAV server running on http://127.0.0.1:8000
[info] {1} OPTIONS /
[info] {1} { host: '127.0.0.1:8000',
[info] accept: '*/*',
[info] 'content-length': '0',
[info] connection: 'keep-alive',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)' }
[info] Receiving headers: {"host":"127.0.0.1:8000","accept":"*/*","content-length":"0","connection":"keep-alive","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {1} 200 { Allow: 'OPTIONS,GET,HEAD,DELETE,PROPFIND,PUT,PROPPATCH,COPY,MOVE,REPORT',
[info] 'MS-Author-Via': 'DAV',
[info] 'Accept-Ranges': 'bytes',
[info] 'X-jsDAV-Version': '0.3.2',
[info] 'Content-Length': 0,
[info] DAV: '1,3,extended-mkcol,2' }
[info] {1} ''
[info] {2} OPTIONS /
[info] {2} { host: '127.0.0.1:8000',
[info] accept: '*/*',
[info] 'content-length': '0',
[info] connection: 'close',
[info] 'user-agent': 'WebDAVLib/1.3' }
[info] Receiving headers: {"host":"127.0.0.1:8000","accept":"*/*","content-length":"0","connection":"close","user-agent":"WebDAVLib/1.3"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {2} 200 { Allow: 'OPTIONS,GET,HEAD,DELETE,PROPFIND,PUT,PROPPATCH,COPY,MOVE,REPORT',
[info] 'MS-Author-Via': 'DAV',
[info] 'Accept-Ranges': 'bytes',
[info] 'X-jsDAV-Version': '0.3.2',
[info] 'Content-Length': 0,
[info] DAV: '1,3,extended-mkcol,2' }
[info] {2} ''
[info] {3} PROPFIND /
[info] {3} { host: '127.0.0.1:8000',
[info] 'content-type': 'text/xml',
[info] depth: '0',
[info] accept: '*/*',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)',
[info] 'content-length': '179',
[info] connection: 'keep-alive' }
[info] Receiving headers: {"host":"127.0.0.1:8000","content-type":"text/xml","depth":"0","accept":"*/*","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)","content-length":"179","connection":"keep-alive"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {3} <?xml version="1.0" encoding="utf-8"?>
[info] <D:propfind xmlns:D="DAV:">
[info] <D:prop>
[info] <D:getlastmodified/>
[info] <D:getcontentlength/>
[info] <D:creationdate/>
[info] <D:resourcetype/>
[info] </D:prop>
[info] </D:propfind>
[info]
[info] {3} 207 { 'content-type': 'application/xml; charset=utf-8',
[info] vary: 'Brief,Prefer',
[info] DAV: '1,3,extended-mkcol,2' }
[info] {3} '<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"><d:response><d:href>/</d:href><d:propstat><d:prop><d:getlastmodified xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">Thu, 05 Dec 2013 01:06:18 +0100</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 Ok</d:status></d:propstat><d:propstat><d:prop></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>'
[info] {4} PROPFIND /
[info] {4} { host: '127.0.0.1:8000',
[info] 'content-type': 'text/xml',
[info] depth: '0',
[info] accept: '*/*',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)',
[info] 'content-length': '179',
[info] connection: 'keep-alive' }
[info] Receiving headers: {"host":"127.0.0.1:8000","content-type":"text/xml","depth":"0","accept":"*/*","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)","content-length":"179","connection":"keep-alive"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {4} <?xml version="1.0" encoding="utf-8"?>
[info] <D:propfind xmlns:D="DAV:">
[info] <D:prop>
[info] <D:getlastmodified/>
[info] <D:getcontentlength/>
[info] <D:creationdate/>
[info] <D:resourcetype/>
[info] </D:prop>
[info] </D:propfind>
[info]
[info] {4} 207 { 'content-type': 'application/xml; charset=utf-8',
[info] vary: 'Brief,Prefer',
[info] DAV: '1,3,extended-mkcol,2' }
[info] {4} '<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"><d:response><d:href>/</d:href><d:propstat><d:prop><d:getlastmodified xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">Thu, 05 Dec 2013 01:06:18 +0100</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 Ok</d:status></d:propstat><d:propstat><d:prop></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>'
[info] {5} PROPFIND /
[info] {5} { host: '127.0.0.1:8000',
[info] 'content-type': 'text/xml',
[info] depth: '0',
[info] accept: '*/*',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)',
[info] 'content-length': '179',
[info] connection: 'keep-alive' }
[info] Receiving headers: {"host":"127.0.0.1:8000","content-type":"text/xml","depth":"0","accept":"*/*","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)","content-length":"179","connection":"keep-alive"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {5} <?xml version="1.0" encoding="utf-8"?>
[info] <D:propfind xmlns:D="DAV:">
[info] <D:prop>
[info] <D:getlastmodified/>
[info] <D:getcontentlength/>
[info] <D:creationdate/>
[info] <D:resourcetype/>
[info] </D:prop>
[info] </D:propfind>
[info]
[info] {5} 207 { 'content-type': 'application/xml; charset=utf-8',
[info] vary: 'Brief,Prefer',
[info] DAV: '1,3,extended-mkcol,2' }
[info] {5} '<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"><d:response><d:href>/</d:href><d:propstat><d:prop><d:getlastmodified xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">Thu, 05 Dec 2013 01:06:18 +0100</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 Ok</d:status></d:propstat><d:propstat><d:prop></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>'
[info] {6} PROPFIND /
[info] {6} { host: '127.0.0.1:8000',
[info] 'content-type': 'text/xml',
[info] depth: '0',
[info] accept: '*/*',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)',
[info] 'content-length': '179',
[info] connection: 'keep-alive' }
[info] Receiving headers: {"host":"127.0.0.1:8000","content-type":"text/xml","depth":"0","accept":"*/*","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)","content-length":"179","connection":"keep-alive"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {6} <?xml version="1.0" encoding="utf-8"?>
[info] <D:propfind xmlns:D="DAV:">
[info] <D:prop>
[info] <D:getlastmodified/>
[info] <D:getcontentlength/>
[info] <D:creationdate/>
[info] <D:resourcetype/>
[info] </D:prop>
[info] </D:propfind>
[info]
[info] {6} 207 { 'content-type': 'application/xml; charset=utf-8',
[info] vary: 'Brief,Prefer',
[info] DAV: '1,3,extended-mkcol,2' }
[info] {6} '<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"><d:response><d:href>/</d:href><d:propstat><d:prop><d:getlastmodified xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">Thu, 05 Dec 2013 01:06:18 +0100</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 Ok</d:status></d:propstat><d:propstat><d:prop></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>'
[info] {7} PROPFIND /
[info] {7} { host: '127.0.0.1:8000',
[info] 'content-type': 'text/xml',
[info] depth: '0',
[info] accept: '*/*',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)',
[info] 'content-length': '179',
[info] connection: 'keep-alive' }
[info] Receiving headers: {"host":"127.0.0.1:8000","content-type":"text/xml","depth":"0","accept":"*/*","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)","content-length":"179","connection":"keep-alive"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {7} <?xml version="1.0" encoding="utf-8"?>
[info] <D:propfind xmlns:D="DAV:">
[info] <D:prop>
[info] <D:getlastmodified/>
[info] <D:getcontentlength/>
[info] <D:creationdate/>
[info] <D:resourcetype/>
[info] </D:prop>
[info] </D:propfind>
[info]
[info] {7} 207 { 'content-type': 'application/xml; charset=utf-8',
[info] vary: 'Brief,Prefer',
[info] DAV: '1,3,extended-mkcol,2' }
[info] {7} '<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:" xmlns:a="http://ajax.org/2005/aml"><d:response><d:href>/</d:href><d:propstat><d:prop><d:getlastmodified xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" b:dt="dateTime.rfc1123">Thu, 05 Dec 2013 01:06:18 +0100</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 Ok</d:status></d:propstat><d:propstat><d:prop></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>'
[info] {8} PROPFIND /._.
[info] {8} { host: '127.0.0.1:8000',
[info] 'content-type': 'text/xml',
[info] depth: '0',
[info] accept: '*/*',
[info] 'user-agent': 'WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)',
[info] 'content-length': '179',
[info] connection: 'keep-alive' }
[info] Receiving headers: {"host":"127.0.0.1:8000","content-type":"text/xml","depth":"0","accept":"*/*","user-agent":"WebDAVFS/3.0.0 (03008000) Darwin/13.0.2 (x86_64)","content-length":"179","connection":"keep-alive"}
[info] Returning headers: {"Access-Control-Allow-Methods":"GET, HEAD, PUT, POST, DELETE, TRACE, OPTIONS, CONNECT, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, GETLIB","Access-Control-Max-Age":"86400","Access-Control-Allow-Headers":["accept","accept-charset","accept-encoding","accept-language","authorization","content-length","content-type","host","origin","proxy-connection","referer","user-agent","x-requested-with"],"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Origin":"*"}
[info] {8} <?xml version="1.0" encoding="utf-8"?>
[info] <D:propfind xmlns:D="DAV:">
[info] <D:prop>
[info] <D:getlastmodified/>
[info] <D:getcontentlength/>
[info] <D:creationdate/>
[info] <D:resourcetype/>
[info] </D:prop>
[info] </D:propfind>
[info]
myDirectory > getChild
myFile > initialize