| ||||||||
Election 2006 (and beyond): Digital Copyright Canada
From: Russell McOrmond <russell_-at-_flora.ottawa.on.ca>
To: flora-admin-design_-at-_flora.org
Date: Sat, 6 Jan 2001 12:00:14 -0500 (EST)
This gives beginning reading to our more technical readers about WebDAV.
I will hopefully be looking into this in the future as an enhancement to,
or future replacement of, the current FTP interface for manipulating
websites.
The largest unknown part of this is the authentication and security of
the system.
---
Russell McOrmond, Internet Consultant: <http://russell.flora.org/work/>
Back in Ottawa and catching up on Email from after trip to India.
Replies to some email may be slow.
---------- Forwarded message ----------
Date: Thu, 28 Dec 2000 15:36:39 +0000
From: Apache Week <mjc@redhat.com>
To: apacheweek@apacheweek.com
Subject: Apache Week issue 228 (29th December 2000)
This is the latest edition of Apache Week. To read this issue or any
past issues, see http://www.apacheweek.com/
----------------------------------------------------------------------
APACHE WEEK
The essential weekly guide for users of the world's most popular Web server.
Issue 228: 29th December 2000
========================== Advert ===========================
Sponsored by Secant Technologies
Run Server-Side Java Apps Across A Mixed Cluster Of Servers!
A review in InfoWorld had this to say of Secant's Extreme
Internet Server (EIS): "...you can create mixed clusters
with hosts running on any supported OS and control them from
a single EIS console...I had a web server system that I
literally could not break." EIS is FREE for developer use.
Download it here: http://www.secant.com/products/internet/
=================================================================
In this issue
* Web Authoring and HTTP
This is a special holiday edition of Apache Week. Next week we'll
be back to the regular format of news and updates. Joe Orton
examines WebDAV, the distributed authoring protocol for HTTP,
explaining what WebDAV is and the current state of client and
server support.
Feature: Web Authoring and HTTP
Traditionally, HTTP has only been used for web browsing, not web
authoring. In situations where the author of a web site does not
have direct access to the file-system which is being served, a
protocol is used such as NFS, or a version control system which
allows remote access, such as CVS. Alternatively, less privileged
authors, who are using a dial-up Internet Service Provider, might
be given FTP access to an area on a web server.
Introduction to HTTP
Before giving a description of WebDAV, it is useful to give a brief
introduction to HTTP itself. The protocol consists of a request: a
request message sent by the client to the server, followed by a
response: the reply to the message, sent from the server back to
the client.
There are three important elements of an HTTP request: the method,
the URI, and the headers. The method describes the type of the
request. The HTTP specification, [1]RFC 2616, defines eight
different methods, from the familiar GET, to the obscure TRACE. The
URI identifies the resource on which the method is intended to
operate. Headers provide any extra information about the request
that is required.
A syntactically valid (but meaningless) HTTP request and the
response is given below. It uses the FOOBAR method, includes three
headers "Host", "Something", and "Another", and is target at the
resource "/sample/uri.html". The response uses the "501 Method Not
implemented" status code, telling the client that the server does
not understand the request.
FOOBAR /sample/uri.html HTTP/1.1
Host: www.somewhere.com
Something: else
Another: header
HTTP/1.1 501 Method Not Implemented
Date: Mon, 16 Oct 2000 15:19:09 GMT
Server: Apache/1.3.12 (Unix) DAV/1.0.2
Connection: close
Allow: GET, HEAD, OPTIONS, TRACE
...
New HTTP methods
During web browsing, the only HTTP methods that are normally used
are GET, to retrieve documents, and POST, to submit form data back
to the server. The WebDAV specification, [2]RFC 2518, describes a
set of new methods which allow clients to publish documents, and
manipulate a remote repository in a variety of ways to meet the
needs of web authoring. The methods fall into three groups:
1. PROPFIND and PROPPATCH; for querying and manipulating properties.
2. LOCK and UNLOCK; for locking purposes.
3. MOVE, COPY and MKCOL; for basic repository manipulation.
In addition to the new methods, WebDAV refines the definition of
the PUT and DELETE methods, which are already present in the HTTP
specification.
Basic web publishing
The PUT method, as covered in [3]a previous feature article,
provides the most basic form of web publishing. This method is used
to upload new or changed documents to the server.
WebDAV introduces the concept of a collection of resources to HTTP.
A collection is analogous to a directory in traditional file-system
terms: it has a name which ends in a /, and is a container for both
normal resources, and also other collections. Collections can be
created using the MKCOL method, which is similar to creating
directories using the mkdir command.
MKCOL /dav/newcollection/ HTTP/1.0
Host: test.webdav.org
HTTP/1.1 201 Created
Server: Apache/1.3.11 (Unix) DAV/1.0.2
Content-Type: text/html
Date: Mon, 16 Oct 2000 09:10:06 GMT
...
The last two methods required for basic web authoring are the COPY
and MOVE methods. These methods can operate in one of two ways: on
a collection resource, they can recurse down an entire tree of
resources, or alternatively, they can just operate on a single
resource (of any type). The Depth HTTP header is used by the client
to indicate which mode of operation is desired for a particular
request; Depth: infinity meaning operate recursively, and Depth: 0
meaning operate only on a single resource.
Properties
WebDAV allows you to define properties on resources. Two types of
properties are used: live properties, which are defined by the
server, store information like the last date on which the document
was modified. Dead properties are used by clients as simple data
stores. An example of a dead property is the name of the author of
the page.
The first method which is used with properties is PROPFIND: used to
simply request all properties available on a document, or
alternatively, just a specific set of properties. XML is used in
the request body to give the parameters for the PROPFIND request,
and also in the response, to list the property names and their
values. The Depth header is also used with PROFIND requests: taking
the values 0 and infinity as before, meaning in this case "give
properties for a single resource only", or "give properties for all
resources in this collection and below" respectively. The value 1
is also allowed, which requests properties on a collection
resource, and it's immediate descendants only, without recursing
into any child collections. A simple request for the properties
"getlastmodified" and "getcontentlength" is given below: (the
values returned for these properties are highlighted in italics)
PROPFIND /dav/test.html HTTP/1.1
Host: test.webdav.org
Depth: 0
Content-type: text/xml
Content-Length: 174
<?xml version="1.0" encoding="utf-8" ?>
<propfind xmlns="DAV:">
<prop>
<getlastmodified/>
<getcontentlength/>
</prop>
</propfind>
HTTP/1.1 207 Multi-Status
Server: Apache/1.3.11 (Unix) DAV/1.0.2
Content-Type: text/xml; charset="utf-8"
Date: Fri, 13 Oct 2000 13:51:25 GMT
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response xmlns:lp0="DAV:" xmlns:lp1="http://apache.org/dav/props/">
<D:href>/dav/test.html</D:href>
<D:propstat>
<D:prop>
<lp0:getlastmodified>Fri, 13 Oct 2000 12:51:56 GMT</lp0:getlastmodified>
<lp0:getcontentlength>105</lp0:getcontentlength>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
The PROPPATCH method, similarly, uses an XML request body to
specify the changes which should be made to a set of properties.
PROPPATCH requests are made up of a combination of the following
two operations:
* delete a named property
* submit a new value for a named property
Locking
A lot of web authoring will involve more than one person working on
a site at the sime time. Under these circumstances the lost update
problem can occur, where two authors download a document and make
some changes, then later, both authors upload their changes again,
one set overwriting the other.
WebDAV provides a mechanism which can be used to prevent this
situation, by allowing authors to lock a document while they are
editing it. Once an author has locked a document, they are
guaranteed that nobody else will be able to upload changes to the
document.
The WebDAV specification makes locking support optional for server
implementors. The level of server support for WebDAV is defined to
in one of two classes: and Class 1, all requirements are met for
basic web authoring, and Class 2, which extends Class 1 to include
locking support.
WebDAV servers
The [4]mod_dav module adds WebDAV support to an Apache 1.3 server.
mod_dav has been under development for two years, and is currently
at version 1.0.2. The module has also been integrated into the
Apache 2.0 source tree, and is distributed as part of the recent
alpha 7 release.
Commercial WebDAV servers are available from Microsoft, Xythos, and
Novell, amongst others.
On-line Storage Sites
The on-line storage market has eagerly embraced WebDAV, with sites
like [5]Sharemation, [6]MyDocsOnline, and [7]Driveway all offering
access to private or shared WebDAV repositories for free.
A walk on the client side
Microsoft are providing strong support for WebDAV on the client
side: [8]Internet Explorer 5 is provided with "Web Folders", which
allow the user to view and manipulate a WebDAV repository inside
the web browser. Office 2000 also supports editing web pages
in-place using DAV, and makes use of the locking methods to prevent
the [9]lost update problem as described above. Microsoft's web
publishing package FrontPage, ironically, lacks WebDAV support.
[10]Adobe GoLive 5 also supports WebDAV.
There are several Open Source WebDAV projects. [11]cadaver provides
a command-line interface similar to the ubiquitous ftp client. For
Macintosh users, [12]Goliath has a familiar Finder-like interface.
For more information, refer to [13]the list hosted at the
webdav.org site hosts of open source and commercial projects with
WebDAV support.
______________________________________________________________
Comments or criticisms? Please email us at
[14]editors@apacheweek.com.
[15]Apache Week is copyright 1996-2000 by [16]Red Hat, Inc.
References
1. http://www.ietf.org/rfc/rfc2616.txt
2. http://www.ietf.org/rfc/rfc2518.txt
3. http://www.apacheweek.com/features/put
4. http://www.webdav.org/mod_dav/
5. http://www.sharemation.com/
6. http://www.mydocsonline.com/
7. http://www.driveway.com/
8. http://www.microsoft.com/windows/ie/default.htm
9. http://www.apacheweek.com/issues/current#lostupdate
10. http://www.adobe.com/products/golive/
11. http://www.webdav.org/cadaver/
12. http://www.webdav.org/goliath/
13. http://www.webdav.org/projects/
14. mailto:editors@apacheweek.com
15. http://www.apacheweek.com/
16. http://www.redhat.com/
------------------------------------------------------------------------
To stop receiving Apache Week, send a message to majordomo@apacheweek.com
containing the text
unsubscribe apacheweek
| Please read the FLORA.org Terms and Conditions before you submit information to FLORA.org | |
|
(USA) (Canada) |
|