(overall-status nil))
(when buffer
(unwind-protect
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(goto-char url-http-end-of-headers)
(setq overall-status url-http-response-status)
;; them.
(if (and
url-http-content-type
- (or (string-match "^text/xml" url-http-content-type)
- (string-match "^application/xml" url-http-content-type)))
+ (string-match "\\`\\(text\\|application\\)/xml"
+ url-http-content-type))
(setq tree (xml-parse-region (point) (point-max)))))
;; Clean up after ourselves.
- '(kill-buffer buffer)))
+ (kill-buffer buffer)))
- ;; We should now be
+ ;; We should now be
(if (eq (xml-node-name (car tree)) 'DAV:multistatus)
(url-dav-dispatch-node (car tree))
(url-debug 'dav "Got back singleton response for URL(%S)" url)
(result nil))
(when buffer
(unwind-protect
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(setq result (url-dav-http-success-p url-http-response-status)))
(kill-buffer buffer)))
result))
(autoload 'url-http-head-file-attributes "url-http")
;;;###autoload
-(defun url-dav-file-attributes (url)
+(defun url-dav-file-attributes (url &optional id-format)
(let ((properties (cdar (url-dav-get-properties url)))
(attributes nil))
(if (and properties
;; device number - meaningless
nil))
;; Fall back to just the normal http way of doing things.
- (setq attributes (url-http-head-file-attributes url)))
+ (setq attributes (url-http-head-file-attributes url id-format)))
attributes))
;;;###autoload
(url-request-data
(cond
((bufferp obj)
- (save-excursion
- (set-buffer obj)
+ (with-current-buffer obj
(buffer-string)))
((stringp obj)
obj)
;; Sanity checking
(when buffer
(unwind-protect
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(setq result (url-dav-http-success-p url-http-response-status)))
(kill-buffer buffer)))
result))
(result nil))
(when buffer
(unwind-protect
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(case url-http-response-status
(201 ; Collection created in its entirety
(setq result t))