X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=tt.rkt;h=f4c1b85cbeef6a34bccad96186b17ae8c53553e0;hb=68bbd2e9f42d401e184ecf35106d833a6c4338db;hp=a375c69f05aaa1f979741ec96ceb99bed5b72ee6;hpb=b39ba7bee95268e33eddab23bf19583a66f8c123;p=tt.git diff --git a/tt.rkt b/tt.rkt index a375c69..f4c1b85 100644 --- a/tt.rkt +++ b/tt.rkt @@ -468,22 +468,22 @@ (log-debug "Last-Modified <= current skipping the rest of ~v" u-str) #t)))) (if (not cached?) - (begin - (log-debug - "Downloading the rest of ~v. ETag: ~a, Last-Modified: ~v" - u-str etag lmod) - (make-parent-directory* cached-object-path) - (make-parent-directory* cached-etag-path) - (make-parent-directory* cached-lmod-path) - (call-with-output-file cached-object-path - (curry copy-port body-input) - #:exists 'replace) - (when etag - (display-to-file etag cached-etag-path #:exists 'replace)) - (when lmod - (display-to-file lmod cached-lmod-path #:exists 'replace)) - 'downloaded-new) - 'skipped-cached)) + (begin + (log-debug + "Downloading the rest of ~v. ETag: ~a, Last-Modified: ~v" + u-str etag lmod) + (make-parent-directory* cached-object-path) + (make-parent-directory* cached-etag-path) + (make-parent-directory* cached-lmod-path) + (call-with-output-file cached-object-path + (curry copy-port body-input) + #:exists 'replace) + (when etag + (display-to-file etag cached-etag-path #:exists 'replace)) + (when lmod + (display-to-file lmod cached-lmod-path #:exists 'replace)) + 'downloaded-new) + 'skipped-cached)) (: uri-download (-> Positive-Float Url