diff options
| author | Peter Bex <peter@more-magic.net> | 2026-10-05 13:07:22 +0200 |
|---|---|---|
| committer | Peter Bex <peter@more-magic.net> | 2026-10-05 13:07:22 +0200 |
| commit | 136d2d65ecdf77e5ced5b22e9c26bdc3c6ccf971 (patch) | |
| tree | 2297816e9aecce7cb8b762a4d61ff345aceadaf1 /tests | |
| parent | 27d3f7f02ea626b90edab4280b3b143a4b2e340d (diff) | |
| download | spiffy-136d2d65ecdf77e5ced5b22e9c26bdc3c6ccf971.tar.gz | |
Fix content-length to use byte count instead of char count on C66.5
Also, default to utf-8 charsets in default mime type map and default
response headers and when sending status responses and in the simple
directory handler.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm index d7e3d27..6e6062d 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -1,5 +1,5 @@ (import test (chicken irregex) (chicken time) (chicken time posix) - (chicken file) intarweb) + (chicken file) (chicken bytevector) intarweb) ;; Change this to (use spiffy) when compiling tests (load "../spiffy.scm") @@ -49,6 +49,8 @@ (let ((p (response-port (current-response)))) (display "foo" p) (close-output-port p)))) + ("utf8-literal-host" . ,(lambda (continue) + (send-response body: "Multi-byte 😎"))) ("subdir-host" . ,(lambda (continue) (parameterize ((root-path "./testweb/subdir")) (continue)))) @@ -225,6 +227,8 @@ (200 "10.0.0.1") "/whats-my-ip" "ip-host" send-headers: `((x-forwarded-for "10.0.0.1"))) +(test-response "Multi-byte response content-length ok" (200 (string->utf8 "Multi-byte 😎")) + "/whatever" "utf8-literal-host" binary: #t) (test-end "miscellaneous") (test-begin "Caching and other efficiency support") |
