Mercurial > emacs
comparison lisp/url/url-dav.el @ 83542:2d56e13fd23d
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-413
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-414
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-415
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-416
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-417
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-418
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-419
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-420
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-421
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-422
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-423
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-424
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-425
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-426
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-427
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-428
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-429
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-430
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-431
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-432
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-433
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-434
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-435
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-436
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-437
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-438
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-439
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-440
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-441
lisp/url/url-methods.el: Fix format error when http_proxy is empty string
* emacs@sv.gnu.org/emacs--devo--0--patch-442
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-443
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-444
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-445
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-446
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-447
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-448
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-449
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-450
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-451
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-452
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-453
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-454
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-455
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-456
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-457
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-458
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-459
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-460
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-461
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-462
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-463
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-464
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-465
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-466
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-467
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-468
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-469
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-470
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-471
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-472
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-473
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-128
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-129
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-130
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-131
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-132
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-133
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-134
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-135
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-136
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-137
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-138
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-139
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-140
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-141
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-142
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-143
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-144
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-145
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-146
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-147
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-148
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-149
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-582
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 14 Oct 2006 17:36:28 +0000 |
parents | d04d8ccb3c41 b401f081156a |
children | b8d9a391daf3 |
comparison
equal
deleted
inserted
replaced
83541:694bbb62a75d | 83542:2d56e13fd23d |
---|---|
619 modes)) | 619 modes)) |
620 | 620 |
621 (autoload 'url-http-head-file-attributes "url-http") | 621 (autoload 'url-http-head-file-attributes "url-http") |
622 | 622 |
623 (defun url-dav-file-attributes (url &optional id-format) | 623 (defun url-dav-file-attributes (url &optional id-format) |
624 (let ((properties (cdar (url-dav-get-properties url))) | 624 (let ((properties (cdar (url-dav-get-properties url)))) |
625 (attributes nil)) | |
626 (if (and properties | 625 (if (and properties |
627 (url-dav-http-success-p (plist-get properties 'DAV:status))) | 626 (url-dav-http-success-p (plist-get properties 'DAV:status))) |
628 ;; We got a good DAV response back.. | 627 ;; We got a good DAV response back.. |
629 (setq attributes | 628 (list |
630 (list | 629 ;; t for directory, string for symbolic link, or nil |
631 ;; t for directory, string for symbolic link, or nil | 630 ;; Need to support DAV Bindings to figure out the |
632 ;; Need to support DAV Bindings to figure out the | 631 ;; symbolic link issues. |
633 ;; symbolic link issues. | 632 (if (memq 'DAV:collection (plist-get properties 'DAV:resourcetype)) t nil) |
634 (if (memq 'DAV:collection (plist-get properties 'DAV:resourcetype)) t nil) | 633 |
635 | 634 ;; Number of links to file... Needs DAV Bindings. |
636 ;; Number of links to file... Needs DAV Bindings. | 635 1 |
637 1 | 636 |
638 | 637 ;; File uid - no way to figure out? |
639 ;; File uid - no way to figure out? | 638 0 |
640 0 | 639 |
641 | 640 ;; File gid - no way to figure out? |
642 ;; File gid - no way to figure out? | 641 0 |
643 0 | 642 |
644 | 643 ;; Last access time - ??? |
645 ;; Last access time - ??? | 644 nil |
646 nil | 645 |
647 | 646 ;; Last modification time |
648 ;; Last modification time | 647 (plist-get properties 'DAV:getlastmodified) |
649 (plist-get properties 'DAV:getlastmodified) | 648 |
650 | 649 ;; Last status change time... just reuse last-modified |
651 ;; Last status change time... just reuse last-modified | 650 ;; for now. |
652 ;; for now. | 651 (plist-get properties 'DAV:getlastmodified) |
653 (plist-get properties 'DAV:getlastmodified) | 652 |
654 | 653 ;; size in bytes |
655 ;; size in bytes | 654 (or (plist-get properties 'DAV:getcontentlength) 0) |
656 (or (plist-get properties 'DAV:getcontentlength) 0) | 655 |
657 | 656 ;; file modes as a string like `ls -l' |
658 ;; file modes as a string like `ls -l' | 657 ;; |
659 ;; | 658 ;; Should be able to build this up from the |
660 ;; Should be able to build this up from the | 659 ;; DAV:supportedlock attribute pretty easily. Getting |
661 ;; DAV:supportedlock attribute pretty easily. Getting | 660 ;; the group info could be impossible though. |
662 ;; the group info could be impossible though. | 661 (url-dav-file-attributes-mode-string properties) |
663 (url-dav-file-attributes-mode-string properties) | 662 |
664 | 663 ;; t iff file's gid would change if it were deleted & |
665 ;; t iff file's gid would change if it were deleted & | 664 ;; recreated. No way for us to know that thru DAV. |
666 ;; recreated. No way for us to know that thru DAV. | 665 nil |
667 nil | 666 |
668 | 667 ;; inode number - meaningless |
669 ;; inode number - meaningless | 668 nil |
670 nil | 669 |
671 | 670 ;; device number - meaningless |
672 ;; device number - meaningless | 671 nil) |
673 nil)) | |
674 ;; Fall back to just the normal http way of doing things. | 672 ;; Fall back to just the normal http way of doing things. |
675 (setq attributes (url-http-head-file-attributes url id-format))) | 673 (url-http-head-file-attributes url id-format)))) |
676 attributes)) | |
677 | 674 |
678 (defun url-dav-save-resource (url obj &optional content-type lock-token) | 675 (defun url-dav-save-resource (url obj &optional content-type lock-token) |
679 "Save OBJ as URL using WebDAV. | 676 "Save OBJ as URL using WebDAV. |
680 URL must be a fully qualified URL. | 677 URL must be a fully qualified URL. |
681 OBJ may be a buffer or a string." | 678 OBJ may be a buffer or a string." |