[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)
- [nongnu] elpa/hyperdrive 6a582d3cff 24/26: Docs: Note about non-UTF-8 encoded text, (continued)
- [nongnu] elpa/hyperdrive 6a582d3cff 24/26: Docs: Note about non-UTF-8 encoded text, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive bccee74f7a 02/26: Meta: Update changelog, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 740c21afdb 01/26: Change: (hyperdrive-write-buffer) Don't allocate unnecessary string, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 8187adc021 07/26: Change: Distinguish URL-encoding from text-encoding in docstrings, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 7a1d35cfb4 10/26: Fix: (h/upload-file) Calculate file size, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 7db0f02d6e 08/26: Fix: (he//api-then) Decode response bodies, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive c4fe98415b 13/26: Meta: Acknowledge Eli Zaretskii, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 0ee751c591 14/26: Fix: (h/write-buffer) Fix charset in entry type, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 4ef6496965 11/26: Fix: (h/dir--yank-media-image-handler) Calculate file size, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 6874248ed5 16/26: Fix: (hyperdrive-write-buffer) Clean up encoded buffer, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 0043faa8c7 17/26: Fix: (hyperdrive-write-buffer) Get file size from encoded buffer,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 0702f40645 19/26: Comment: Add TODO, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive ab77599b03 23/26: Tidy: (CHANGELOG), ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 417c43a429 21/26: Change: (h//gateway-stop-default) Make longer timeout, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 15a83a252e 06/26: Change: (h/write) Clarify BODY argument type in docstring, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 60763306a0 12/26: Meta: Update changelog, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive e09ead79c4 15/26: Comment: Add FIXME, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 40475d9d13 22/26: Change: (hyperdrive-menu) Change description to "..." from "starting", ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive 4d10e5584b 25/26: WIP: (hyperdrive--gateway-stop-default) Make asynchronous, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive cbe2a28041 03/26: Fix: (h/write) Encode metadata JSON as UTF-8, ELPA Syncer, 2024/08/30
- [nongnu] elpa/hyperdrive c05904f585 26/26: Change: Hook up new gateway-stopping code, ELPA Syncer, 2024/08/30