1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
|
<pre>Network Working Group J. Reschke
Request for Comments: 4709 greenbytes
Category: Informational October 2006
<span class="h1">Mounting Web Distributed Authoring and Versioning (WebDAV) Servers</span>
Status of This Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
In current Web browsers, there is no uniform way to specify that a
user clicking on a link will be presented with an editable view of a
Web Distinguished Authoring and Versioning (WebDAV) server. For
example, it is frequently desirable to be able to click on a link and
have this link open a window that can handle drag-and-drop
interaction with the resources of a WebDAV server.
This document specifies a mechanism and a document format that
enables WebDAV servers to send "mounting" information to a WebDAV
client. The mechanism is designed to work on any platform and with
any combination of browser and WebDAV client, relying solely on the
well-understood dispatch of documents through their MIME type.
<span class="grey">Reschke Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-2">2</a>
<a href="#section-2">2</a>. Terminology .....................................................<a href="#page-3">3</a>
<a href="#section-3">3</a>. Format ..........................................................<a href="#page-3">3</a>
<a href="#section-3.1">3.1</a>. dm:mount ...................................................<a href="#page-4">4</a>
<a href="#section-3.2">3.2</a>. dm:url .....................................................<a href="#page-4">4</a>
<a href="#section-3.3">3.3</a>. dm:open ....................................................<a href="#page-4">4</a>
<a href="#section-3.4">3.4</a>. dm:username ................................................<a href="#page-4">4</a>
<a href="#section-4">4</a>. Example .........................................................<a href="#page-4">4</a>
<a href="#section-5">5</a>. Internationalization Considerations .............................<a href="#page-5">5</a>
<a href="#section-6">6</a>. IANA Considerations .............................................<a href="#page-6">6</a>
<a href="#section-6.1">6.1</a>. MIME Type Registration .....................................<a href="#page-6">6</a>
<a href="#section-7">7</a>. Security Considerations .........................................<a href="#page-8">8</a>
<a href="#section-8">8</a>. Acknowledgements ................................................<a href="#page-8">8</a>
<a href="#section-9">9</a>. References ......................................................<a href="#page-9">9</a>
<a href="#section-9.1">9.1</a>. Normative References .......................................<a href="#page-9">9</a>
<a href="#section-9.2">9.2</a>. Informative References .....................................<a href="#page-9">9</a>
<a href="#appendix-A">Appendix A</a>. Alternative Approaches ...............................<a href="#page-10">10</a>
<a href="#appendix-A.1">A.1</a>. ...Through HTML/CSS Extensions ............................<a href="#page-10">10</a>
<a href="#appendix-A.2">A.2</a>. ...Through Custom URI Schemes .............................<a href="#page-10">10</a>
<a href="#appendix-B">Appendix B</a>. Implementations ......................................<a href="#page-10">10</a>
<a href="#appendix-B.1">B.1</a>. Example Implementation for Webfolder Client ...............<a href="#page-10">10</a>
<a href="#appendix-B.2">B.2</a>. Xythos ....................................................<a href="#page-14">14</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
By definition, a Web Distributed Authoring and Versioning (WebDAV)
server ([<a href="./rfc2518" title=""HTTP Extensions for Distributed Authoring -- WEBDAV"">RFC2518</a>]) is an HTTP server as well ([<a href="./rfc2616" title=""Hypertext Transfer Protocol -- HTTP/1.1"">RFC2616</a>]). Most
WebDAV servers can be (at least partly) operated from an HTML-based
user interface in a web browser. However, it is frequently desirable
to be able to switch from an HTML-based view to a presentation
provided by a native WebDAV client, directly supporting the authoring
features defined in WebDAV and related specifications.
This document specifies a platform-neutral mechanism based on the
dispatch of documents through their MIME type. For completeness,
<a href="#appendix-A">Appendix A</a> lists other approaches that have been implemented in
existing clients.
For example, many educational institutions use WebDAV servers as a
mechanism for sharing documents among students. Each student owns a
separate collection structure on a WebDAV server, often called his/
her "locker". Ideally, when users click on a link in an HTML page
provided by the university (perhaps by their university Web portal),
an editable view of their locker will appear.
<span class="grey">Reschke Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</span>
The terminology used here follows that in the WebDAV Distributed
Authoring Protocol specification [<a href="./rfc2518" title=""HTTP Extensions for Distributed Authoring -- WEBDAV"">RFC2518</a>].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
This document uses XML DTD fragments ([<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>]) as a purely notational
convention. In particular:
o Element names use the namespace
"<a href="http://purl.org/NET/webdav/mount">http://purl.org/NET/webdav/mount</a>". When an XML element type in
this namespace is referenced in this document outside of the
context of an XML fragment, the string "dm:" will be prefixed to
the element name.
o Element ordering is irrelevant.
o Extension elements/attributes (elements/attributes not already
defined as valid child elements) may be added anywhere, except
when explicitly stated otherwise.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Format</span>
A WebDAV mount request is encoded in a specific XML format ([<a href="#ref-XML" title=""Extensible Markup Language (XML) 1.0 (Fourth Edition)"">XML</a>])
with a well-defined MIME type (see <a href="#section-6.1">Section 6.1</a>). The MIME type
allows user agents to dispatch the content to a handler specific to
the system's WebDAV client.
The elements defined below use the namespace
"<a href="http://purl.org/NET/webdav/mount">http://purl.org/NET/webdav/mount</a>".
<!ELEMENT mount (url, open?, username?) >
<!ELEMENT url (#PCDATA) >
<!-- PCDATA value: scheme ":" hier-part, as defined in <a href="./rfc3986#section-3">Section 3 of
[RFC3986]</a> -->
<!ELEMENT open (#PCDATA) >
<!-- PCDATA value: path, as defined in <a href="./rfc3986#section-3">Section 3 of
[RFC3986]</a> -->
<!ELEMENT username (#PCDATA) >
<span class="grey">Reschke Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. dm:mount</span>
The <dm:mount> element acts as a container for all the remaining
elements defined by this protocol.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. dm:url</span>
The mandatory <dm:url> element provides the HTTP URL of the WebDAV
collection that should be mounted by the client.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. dm:open</span>
The optional <dm:open> element instructs the client to display the
specified child collection; its URL is computed by concatenating this
element's value with the URL obtained from the <dm:url> (<a href="#section-3.2">Section 3.2</a>)
element (see <a href="#section-7">Section 7</a> for a discussion about why this element only
supports displaying collections rather than opening arbitrary
documents).
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. dm:username</span>
The server can use the optional <dm:username> element to specify the
name of the currently authenticated principal. A client can use this
value to select a matching mount point (different users may have
mounted the URL with different credentials under different local
mount points) or to provide a meaningful default for authentication
against the server. It is common that a browser and WebDAV client do
not share HTTP connections, so including this information in the
mount document increases usability.
Implementation Note: If a <dm:username> element is present, public
caching of the document should be disallowed. Thus, appropriate
'Vary' or 'Cache-Control' headers are needed in the server response.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Example</span>
In the example below, the client first retrieves a representation of
a WebDAV collection using a generic Web browser (1). The returned
HTML content contains a hyperlink that identifies the "davmount"
document in the format defined in <a href="#section-3">Section 3</a> (2). The user follows
this link (3), which causes the server to return the "davmount"
document to the user's browser (4). The browser in turn passes the
content to the application that was registered to handle the
"application/davmount+xml" MIME type, usually the default WebDAV
client on the client's system.
<span class="grey">Reschke Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
(1) Client retrieves representation of WebDAV collection "/user42/
inbox/".
GET /user42/inbox/ HTTP/1.1
Host: www.example.com
(2) Server returns representation.
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: xxx
..
<a href="?action=davmount">View this collection in your
WebDAV client</a>
..
(note that the example shows only that part of the HTML page that
contains the relevant link)
(3) Client follows link to "davmount" document
GET /user42/inbox/?action=davmount HTTP/1.1
Host: www.example.com
(4) Server returns "davmount" document
HTTP/1.1 200 OK
Content-Type: application/davmount+xml
Content-Length: xxx
Cache-Control: private
<dm:mount xmlns:dm="http://purl.org/NET/webdav/mount">
<dm:url>http://www.example.com/user42/</dm:url>
<dm:open>inbox/</dm:open>
</dm:mount>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Internationalization Considerations</span>
This document does not introduce any new internationalization
considerations beyond those discussed in <a href="./rfc2518#section-16">[RFC2518], Section 16</a>.
<span class="grey">Reschke Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. IANA Considerations</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. MIME Type Registration</span>
Type name:
application
Subtype name:
davmount+xml
Required parameters:
none
Optional parameters:
"charset": This parameter has identical semantics to the charset
parameter of the "application/xml" media type as specified in
[<a href="./rfc3023" title=""XML Media Types"">RFC3023</a>].
Encoding considerations:
Identical to those of "application/xml" as described in <a href="./rfc3023#section-3.2">[RFC3023],
Section 3.2</a>.
Security considerations:
As defined in this specification. In addition, as this media type
uses the "+xml" convention, it shares the same security
considerations as described in <a href="./rfc3023#section-10">[RFC3023], Section 10</a>.
Interoperability considerations:
There are no known interoperability issues.
Published specification:
This specification.
Applications that use this media type:
SAP Netweaver Knowledge Management, Xythos Drive.
<span class="grey">Reschke Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
Additional information:
Magic number(s):
As specified for "application/xml" in <a href="./rfc3023#section-3.2">[RFC3023], Section 3.2</a>.
File extension(s):
.davmount
Fragment identifiers:
As specified for "application/xml" in <a href="./rfc3023#section-5">[RFC3023], Section 5</a>.
Base URI:
As specified in <a href="./rfc3023#section-6">[RFC3023], Section 6</a>.
Macintosh file type code(s):
TEXT
Person & email address to contact for further information:
Julian Reschke <julian.reschke@greenbytes.de>
Intended usage:
COMMON
Restrictions on usage:
None.
Author:
Julian Reschke
Change controller:
IESG
<span class="grey">Reschke Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
All security considerations connected to HTTP/WebDAV and XML apply
for this specification as well, namely, [<a href="./rfc2518" title=""HTTP Extensions for Distributed Authoring -- WEBDAV"">RFC2518</a>] (<a href="#section-17">Section 17</a>) and
[<a href="./rfc3470" title=""Guidelines for the Use of Extensible Markup Language (XML) within IETF Protocols"">RFC3470</a>] (<a href="#section-7">Section 7</a>).
In addition, client implementers must be careful when implementing
the <dm:open> element (see <a href="#section-3.3">Section 3.3</a>). It MUST NOT be used to
initiate any action beyond displaying the contents of a WebDAV
collection (supporting "opening" documents could be abused to trick a
user into letting the operating system's shell execute arbitrary
content, possibly running it as an executable program).
The OPTIONAL <dm:username> element defined in <a href="#section-3.4">Section 3.4</a> allows the
inclusion of user names into mount documents. However in some cases,
user name information is considered to be security sensitive. Should
this be the case, parties generating mount documents are advised to
either not to include user names, or to use access control to
restrict access to the information as desired.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Acknowledgements</span>
This document has benefited from thoughtful discussion by Emile
Baizel, Spencer Dawkins, Lisa Dusseault, Stefan Eissing, Joe
Gregorio, Michal Gregr, Russ Housley, Jim Luther, Jaroslav Mazanec,
and Jim Whitehead.
<span class="grey">Reschke Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-RFC2518">RFC2518</a>] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D.
Jensen, "HTTP Extensions for Distributed Authoring --
WEBDAV", <a href="./rfc2518">RFC 2518</a>, February 1999.
[<a id="ref-RFC2616">RFC2616</a>] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", <a href="./rfc2616">RFC 2616</a>, June 1999.
[<a id="ref-RFC3023">RFC3023</a>] Murata, M., St.Laurent, S., and D. Kohn, "XML Media
Types", <a href="./rfc3023">RFC 3023</a>, January 2001.
[<a id="ref-RFC3986">RFC3986</a>] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
<a href="./rfc3986">RFC 3986</a>, January 2005.
[<a id="ref-XML">XML</a>] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth
Edition)", W3C REC-xml-20060816, August 2006,
<<a href="http://www.w3.org/TR/2006/REC-xml-20060816">http://www.w3.org/TR/2006/REC-xml-20060816</a>>.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. Informative References</span>
[<a id="ref-RFC3470">RFC3470</a>] Hollenbeck, S., Rose, M., and L. Masinter, "Guidelines for
the Use of Extensible Markup Language (XML) within IETF
Protocols", <a href="./rfc3470">RFC 3470</a>, <a href="https://www.rfc-editor.org/bcp/bcp70">BCP 70</a>, January 2003.
[<a id="ref-WEBARCH">WEBARCH</a>] Walsh, N. and I. Jacobs, "Architecture of the World Wide
Web, Volume One", W3C REC-webarch-20041215, December 2004,
<<a href="http://www.w3.org/TR/2004/REC-webarch-20041215/">http://www.w3.org/TR/2004/REC-webarch-20041215/</a>>.
<span class="grey">Reschke Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Alternative Approaches</span>
<span class="h3"><a class="selflink" id="appendix-A.1" href="#appendix-A.1">A.1</a>. ...Through HTML/CSS Extensions</span>
Microsoft Internet Explorer implements a Cascading Style Sheet (CSS)
extension that allows switching to its own WebDAV client
("Webfolder", see <<a href="http://msdn.microsoft.com/workshop/author/behaviors/reference/behaviors/anchor.asp">http://msdn.microsoft.com/workshop/author/</a>
<a href="http://msdn.microsoft.com/workshop/author/behaviors/reference/behaviors/anchor.asp">behaviors/reference/behaviors/anchor.asp</a>>). However, at the time of
this writing, this extension was not implemented by any other user
agent.
<span class="h3"><a class="selflink" id="appendix-A.2" href="#appendix-A.2">A.2</a>. ...Through Custom URI Schemes</span>
The "kio" library of the "K Desktop Enviroment"
(<<a href="http://www.kde.org/">http://www.kde.org/</a>>) uses the URI scheme "webdav" to dispatch to
the system's WebDAV client. This URI scheme is not registered, nor
is it supported on other platforms. Furthermore, the W3C's
"Architecture of the World Wide Web, Volume One" explicitly advises
against defining new schemes when existing schemes can be used:
A specification SHOULD reuse an existing URI scheme (rather than
create a new one) when it provides the desired properties of
identifiers and their relation to resources.
(See [<a href="#ref-WEBARCH" title=""Architecture of the World Wide Web, Volume One"">WEBARCH</a>], Section 2.4.)
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Implementations</span>
<span class="h3"><a class="selflink" id="appendix-B.1" href="#appendix-B.1">B.1</a>. Example Implementation for Webfolder Client</span>
The figure below shows a sample implementation of a dispatcher for
the application/davmount+xml datatype, suited for Win32 systems and
the Microsoft "Webfolder" client.
// sample implementation of application/davmount+xml
// dispatcher for Windows Webfolder client
//
// to install/uninstall:
// wscript davmount.js
//
// to open the webfolder:
// wscript davmount.js filename
// (where filename refers to an XML document with MIME type
// application/davmount+xml)
var EXTENSION = ".davmount";
var MIMETYPE = "application/davmount+xml";
var REGKW = "WebDAV.mount";
<span class="grey">Reschke Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
var NS = "xmlns:m='http://purl.org/NET/webdav/mount";
// remove keys/entries from the registry
function regdel(shell, key) {
try {
var x = shell.RegRead(key);
try {
shell.RegDelete(key);
}
catch(e) {
WScript.Echo("Error removing key " + key + ": " + e);
}
}
catch(e) {
// entry not present
}
}
// methods for registering/unregistering the handler
function install() {
var WshShell = new ActiveXObject("WScript.Shell");
if (WshShell == null) {
WScript.Echo("Couldn't instantiate WScript.Shell object");
return 2;
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
var RegExt = "HKCR\\" + EXTENSION + "\\";
var RegMimeType = "HKCR\\MIME\\DataBase\\Content Type\\"
+ MIMETYPE + "\\";
var RegKw = "HKCR\\" + REGKW + "\\";
var extension = null;
try {
extension = WshShell.RegRead(RegMimeType + "Extension");
}
catch (e) {
}
if (extension == null) {
var but = WshShell.popup("Install the dispatcher for mime type "
+ MIMETYPE + "?", 0, MIMETYPE + " installation", 4);
<span class="grey">Reschke Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
if (but == 6) {
try {
WshShell.RegWrite(RegExt, REGKW);
WshShell.RegWrite(RegExt + "Content Type", MIMETYPE);
WshShell.RegWrite(RegMimeType + "Extension", EXTENSION);
WshShell.RegWrite(RegKw, "WebDAV Mount Request");
WshShell.RegWrite(RegKw + "DefaultIcon\\",
"shell32.dll,103");
var path = fso.getAbsolutePathName("davmount.js");
WshShell.RegWrite(RegKw + "shell\\open\\command\\",
"%SystemRoot%\\system32\\wscript.exe /nologo \""
+ path + "\" \"%1\"", "REG_EXPAND_SZ");
}
catch (e) {
WScript.Echo("Error writing to registry");
return 1;
}
return 0;
}
else {
return 1;
}
}
else {
var but = WshShell.popup("Remove the dispatcher for mime type "
+ MIMETYPE + "?", 0, MIMETYPE + " installation", 4);
if (but == 6) {
regdel(WshShell, RegExt + "Content Type");
regdel(WshShell, RegExt);
regdel(WshShell, RegKw + "shell\\open\\command\\");
regdel(WshShell, RegKw + "DefaultIcon\\");
regdel(WshShell, RegKw);
regdel(WshShell, RegMimeType + "Extension");
regdel(WshShell, RegMimeType);
return 0;
}
else {
return 1;
}
}
}
if (WScript.Arguments.length == 0) {
// install/uninstall
WScript.Quit(install());
<span class="grey">Reschke Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
}
else {
// try to invoke Webfolder
var inp = new ActiveXObject("MSXML2.DOMDocument");
var furi = encodeURI(WScript.Arguments(0));
if (! inp.load(furi)) {
WScript.Echo("Can't read from '"
+ WScript.Arguments(0) + "'!");
WScript.Quit(2);
}
inp.setProperty("SelectionLanguage", "XPath");
inp.setProperty("SelectionNamespaces",
"xmlns:m='http://purl.org/NET/webdav/mount'");
var n1 = inp.selectSingleNode("/m:mount/m:url");
var n2 = inp.selectSingleNode("/m:mount/m:open");
if (n1 == null) {
WScript.Echo("<url> element missing.");
WScript.Quit(2);
}
var ie = new ActiveXObject("InternetExplorer.Application");
ie.Navigate("about:blank");
var doc = ie.Document;
var folder = doc.createElement("span");
folder.addBehavior("#default#httpFolder");
var result = folder.navigate(n1.text +
(n2 == null ? "" : n2.text));
// close the window again when there was no <open> element
if (n2 == null) ie.Quit();
if (result != "OK") {
if (result == "PROTOCOL_NOT_SUPPORTED") {
WScript.Echo("This site doesn't seem to support WebDAV.");
WScript.Quit(1);
}
else {
WScript.Echo("Unexpected status: " + result);
WScript.Quit(2);
}
}
<span class="grey">Reschke Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
}
<span class="h3"><a class="selflink" id="appendix-B.2" href="#appendix-B.2">B.2</a>. Xythos</span>
The "Xythos Drive" WebDAV client for WebDAV supports this
specification starting with version 4.4.
Author's Address
Julian F. Reschke
greenbytes GmbH
Hafenweg 16
Muenster, NW 48155
Germany
Phone: +49 251 2807760
Fax: +49 251 2807761
EMail: julian.reschke@greenbytes.de
URI: <a href="http://greenbytes.de/tech/webdav/">http://greenbytes.de/tech/webdav/</a>
<span class="grey">Reschke Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc4709">RFC 4709</a> Mounting WebDAV Servers October 2006</span>
Full Copyright Statement
Copyright (C) The Internet Society (2006).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA).
Reschke Informational [Page 15]
</pre>
|