From 3338e5a067e00789e50ee57b5635c55371e4cec0 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Tue, 1 Sep 2026 11:15:11 +0200 Subject: Reindent, update copyright, remove obsolete TODO --- http-client.scm | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'http-client.scm') diff --git a/http-client.scm b/http-client.scm index a0cf59f..e6c8831 100644 --- a/http-client.scm +++ b/http-client.scm @@ -1,7 +1,7 @@ ;;; ;;; Convenient HTTP client library ;;; -;; Copyright (c) 2008-2024, Peter Bex +;; Copyright (c) 2008-2026, Peter Bex ;; Parts copyright (c) 2000-2004, Felix L. Winkelmann ;; All rights reserved. ;; @@ -62,7 +62,6 @@ ;; needed if there are webservers out there that send the same nonce ;; repeatedly. This client doesn't do request pipelining so we don't ;; generate requests with the same nonce if the server doesn't) -;; * Test and document SSL support ;; * The authenticators stuff is really really ugly. It's intentionally ;; undocumented so nobody is going to rely on it too much yet, and ;; we have the freedom to change it later. @@ -296,23 +295,23 @@ (lambda () ; close (close-input-port port)) peek-char: (lambda () - (if (= pos len) - #!eof - (peek-char port))) + (if (= pos len) + #!eof + (peek-char port))) read-bytevector: (lambda (p bytes buf off) - (let* ((bytes (min bytes (- len pos))) - (bytes-read (read-bytevector! buf port off (+ off bytes)))) - (set! pos (+ pos bytes-read)) - bytes-read)) + (let* ((bytes (min bytes (- len pos))) + (bytes-read (read-bytevector! buf port off (+ off bytes)))) + (set! pos (+ pos bytes-read)) + bytes-read)) read-line: (lambda (p limit) - (if (= pos len) - #!eof - (let* ((bytes-left (- len pos)) - (limit (min (or limit bytes-left) bytes-left)) - (line (read-line port limit))) - (unless (eof-object? line) - (set! pos (+ pos (string-length line)))) - line))))))) + (if (= pos len) + #!eof + (let* ((bytes-left (- len pos)) + (limit (min (or limit bytes-left) bytes-left)) + (line (read-line port limit))) + (unless (eof-object? line) + (set! pos (+ pos (string-length line)))) + line))))))) (define discard-remaining-data! (let ((buf (make-string 1024))) ; Doesn't matter, discarded anyway -- cgit v1.2.3