Changeset 3339
- Timestamp:
- 06/25/08 09:57:00 (7 months ago)
- Files:
-
- trunk/thirdparty/cl-webdav/handlers.lisp (modified) (8 diffs)
- trunk/thirdparty/cl-webdav/properties.lisp (modified) (1 diff)
- trunk/thirdparty/cl-webdav/resources.lisp (modified) (1 diff)
- trunk/thirdparty/cl-webdav/specials.lisp (modified) (2 diffs)
- trunk/thirdparty/cl-webdav/util.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/thirdparty/cl-webdav/handlers.lisp
r3335 r3339 79 79 "The handler for OPTIONS requests. Output is basically 80 80 determined by *ALLOWED-METHODS* and *DAV-COMPLIANCE-CLASSES*." 81 (setf (content-type) nil 82 (header-out :allow) (format nil "~{~A~^, ~}" *allowed-methods*) 81 (setf (header-out :allow) (format nil "~{~A~^, ~}" *allowed-methods*) 83 82 (header-out :dav) (format nil "~{~D~^,~}" *dav-compliance-classes*) 84 83 ;; Win2k wants this - sigh... … … 92 91 \"multistatus\" XML element using the methods for live and dead 93 92 properties." 94 (let* ((depth-header (header-in :depth))93 (let* ((depth-header (header-in* :depth)) 95 94 (depth-value (cond ((or (null depth-header) 96 95 (string-equal depth-header "infinity")) nil) … … 178 177 (catch 'handler-done 179 178 (handle-if-modified-since write-date) 180 (when (equal etag (header-in :if-none-match))179 (when (equal etag (header-in* :if-none-match)) 181 180 (setf (return-code) +http-not-modified+))) 182 181 (when (eql (return-code) +http-not-modified+) … … 220 219 "The handler for DELETE requests. Uses REMOVE-RESOURCE* to do 221 220 the actual work." 222 (let ((depth-header (header-in :depth)))221 (let ((depth-header (header-in* :depth))) 223 222 (unless (or (null depth-header) 224 223 (string-equal depth-header "infinity")) … … 244 243 (when (or (null parent) (not (resource-exists parent))) 245 244 (conflict))) 246 (let* ((content-length-header (cdr (assoc :content-length (headers-in ))))245 (let* ((content-length-header (cdr (assoc :content-length (headers-in*)))) 247 246 (content-length (and content-length-header 248 247 (parse-integer content-length-header :junk-allowed t)))) … … 256 255 COPY-OR-MOVE-RESOURCE* to do the actual work. Also doubles as a 257 256 handler for MOVE requests if MOVEP is true." 258 (let* ((depth-header (header-in :depth))257 (let* ((depth-header (header-in* :depth)) 259 258 (depth-value (cond ((or (null depth-header) 260 259 (string-equal depth-header "infinity")) nil) … … 263 262 (t (warn "Depth header is ~S." depth-header) 264 263 (bad-request)))) 265 (overwrite (equal (header-in :overwrite) "T"))264 (overwrite (equal (header-in* :overwrite) "T")) 266 265 (source (get-resource))) 267 266 ;; note that we ignore a possible request body and thus the … … 270 269 (unless (resource-exists source) 271 270 (not-found)) 272 (let ((destination-header (header-in :destination)))271 (let ((destination-header (header-in* :destination))) 273 272 (unless destination-header 274 273 (warn "No 'Destination' header.") trunk/thirdparty/cl-webdav/properties.lisp
r3335 r3339 81 81 (get-property resource property-designator) 82 82 (error (condition) 83 (log-message *"While trying to get property ~S for resource ~S: ~A"84 (local-name property-designator)85 (resource-script-name resource)86 condition)83 (log-message "While trying to get property ~S for resource ~S: ~A" 84 (local-name property-designator) 85 (resource-script-name resource) 86 condition) 87 87 +http-internal-server-error+)))) 88 88 (etypecase property trunk/thirdparty/cl-webdav/resources.lisp
r3335 r3339 391 391 :script-name script-name))) 392 392 393 (defun get-resource (&optional (script-name (url-decode* (script-name ))))393 (defun get-resource (&optional (script-name (url-decode* (script-name*)))) 394 394 "Creates and returns an object of the type stored in 395 395 *RESOURCE-CLASS* corresponding to the script name SCRIPT-NAME." trunk/thirdparty/cl-webdav/specials.lisp
r3335 r3339 37 37 ,@(when doc (list doc))))) 38 38 39 (defun constantly-nil (&rest args) 40 (declare (ignore args)) 41 nil) 42 39 43 (defconstant +dav-property-alist+ 40 44 `(("creationdate" . creation-date) … … 47 51 ("resourcetype" . resource-type) 48 52 ("source" . resource-source) 49 ("lockdiscovery" . ,(constantly nil))50 ("supportedlock" . ,(constantly nil)))53 ("lockdiscovery" . constantly-nil) 54 ("supportedlock" . constantly-nil)) 51 55 "An alist mapping the \(names of the) standard DAV properties 52 56 to functions handling them.") trunk/thirdparty/cl-webdav/util.lisp
r3335 r3339 91 91 (handler-case 92 92 (url-decode string +utf-8+) 93 (flex: flexi-stream-encoding-error ()93 (flex:external-format-encoding-error () 94 94 (url-decode string +latin-1+))))
