diff options
| author | Stefan Monnier | 2006-09-20 17:35:13 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-09-20 17:35:13 +0000 |
| commit | 162fbe11f5a65e7be3b92157f349fe7f843de0cf (patch) | |
| tree | 41d588d641cf12d74be0041791c08124a873e4ca | |
| parent | 02bb2aabefbfe0055424511f0298712b7c716d5c (diff) | |
| download | emacs-162fbe11f5a65e7be3b92157f349fe7f843de0cf.tar.gz emacs-162fbe11f5a65e7be3b92157f349fe7f843de0cf.zip | |
(url-http-head-file-attributes): Add device "info".
| -rw-r--r-- | lisp/url/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/url/url-http.el | 24 |
2 files changed, 18 insertions, 12 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index fdd735193c9..a6afb0ba20f 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * url-dav.el (url-dav-file-attributes): Simplify. | ||
| 4 | |||
| 5 | * url-http.el (url-http-head-file-attributes): Add device "info". | ||
| 6 | |||
| 1 | 2006-09-18 Michael Olson <mwolson@gnu.org> | 7 | 2006-09-18 Michael Olson <mwolson@gnu.org> |
| 2 | 8 | ||
| 3 | * url-methods.el (url-scheme-register-proxy): Handle case where | 9 | * url-methods.el (url-scheme-register-proxy): Handle case where |
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index a1d87e1bd31..1b8bc459f49 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el | |||
| @@ -1151,19 +1151,19 @@ CBARGS as the arguments." | |||
| 1151 | (defalias 'url-http-file-readable-p 'url-http-file-exists-p) | 1151 | (defalias 'url-http-file-readable-p 'url-http-file-exists-p) |
| 1152 | 1152 | ||
| 1153 | (defun url-http-head-file-attributes (url &optional id-format) | 1153 | (defun url-http-head-file-attributes (url &optional id-format) |
| 1154 | (let ((buffer (url-http-head url)) | 1154 | (let ((buffer (url-http-head url))) |
| 1155 | (attributes nil)) | ||
| 1156 | (when buffer | 1155 | (when buffer |
| 1157 | (setq attributes (make-list 11 nil)) | 1156 | (prog1 |
| 1158 | (setf (nth 1 attributes) 1) ; Number of links to file | 1157 | (list |
| 1159 | (setf (nth 2 attributes) 0) ; file uid | 1158 | nil ;dir / link / normal file |
| 1160 | (setf (nth 3 attributes) 0) ; file gid | 1159 | 1 ;number of links to file. |
| 1161 | (setf (nth 7 attributes) ; file size | 1160 | 0 0 ;uid ; gid |
| 1162 | (url-http-symbol-value-in-buffer 'url-http-content-length | 1161 | nil nil nil ;atime ; mtime ; ctime |
| 1163 | buffer -1)) | 1162 | (url-http-symbol-value-in-buffer 'url-http-content-length |
| 1164 | (setf (nth 8 attributes) (eval-when-compile (make-string 10 ?-))) | 1163 | buffer -1) |
| 1165 | (kill-buffer buffer)) | 1164 | (eval-when-compile (make-string 10 ?-)) |
| 1166 | attributes)) | 1165 | nil nil nil) ;whether gid would change ; inode ; device. |
| 1166 | (kill-buffer buffer))))) | ||
| 1167 | 1167 | ||
| 1168 | ;;;###autoload | 1168 | ;;;###autoload |
| 1169 | (defun url-http-file-attributes (url &optional id-format) | 1169 | (defun url-http-file-attributes (url &optional id-format) |