emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 0043faa8c7 17/26: Fix: (hyperdrive-write-buffer


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 0043faa8c7 17/26: Fix: (hyperdrive-write-buffer) Get file size from encoded buffer
Date: Fri, 30 Aug 2024 16:00:11 -0400 (EDT)

branch: elpa/hyperdrive
commit 0043faa8c70fc53f28192aa23e3d9230d932611e
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (hyperdrive-write-buffer) Get file size from encoded buffer
    
    Even with this change, when I tested by writing a buffer encoded with
    'big5, the size returned by bufferpos-to-filepos was larger than the
    size returned by the gateway in subsequent HEAD/GET requests.
    
    Suggested-by: Adam Porter <adam@alphapapa.net>
---
 hyperdrive.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index a573b30bb3..76552b2d45 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -543,11 +543,8 @@ For non-interactive use, see `hyperdrive-write'."
                   (he//fill entry (plz-response-headers response))
                   ;; PUT responses only include ETag and Last-Modified
                   ;; headers, so we need to set other entry metadata manually.
-                  (setf (he/size entry)
-                        (bufferpos-to-filepos
-                         ;; Use `approximate' as `select-safe-coding-system' 
may
-                         ;; return a coding system without EOL conversion.
-                         (point-max) 'approximate coding-system))
+                  (setf (he/size entry) (with-current-buffer encoded-buffer
+                                          (bufferpos-to-filepos (point-max))))
                   ;; FIXME: Will entry type ever be anything besides 
text/plain?
                   ;;        /.well-known/host-meta.json ?
                   (setf (he/type entry)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]