Commit 4af3147e authored by Eric Timmons's avatar Eric Timmons
Browse files

Fix Range header when requesting the tail of a file

Was off by one. Turns out most web servers don't care, but hunchentoot does!
parent 22879d0f
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
(when (= offset (parse-integer size)) (when (= offset (parse-integer size))
(return-from open-object-stream (make-concatenated-stream))) (return-from open-object-stream (make-concatenated-stream)))
;; Server supports range requests! ;; Server supports range requests!
(push (cons :range (format nil "bytes=~D-~D" offset size)) headers))) (push (cons :range (format nil "bytes=~D-~D" offset (1- size))) headers)))
(multiple-value-bind (s code) (multiple-value-bind (s code)
(http-client-request (http-object-store-http-client object-store) uri (http-client-request (http-object-store-http-client object-store) uri
:additional-headers headers :additional-headers headers
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment