Ticket #1838: redirect-string-port-test.patch

File redirect-string-port-test.patch, 917 bytes (added by Woodrow E Douglass, 5 months ago)
  • tests/run.scm

    diff --git a/tests/run.scm b/tests/run.scm
    index 347c18f..e12e09b 100644
    a b  
    149149
    150150  (test-group "alist form data body with string port"
    151151    (let* ((string-port (open-input-string "the file's contents"))
    152            (log (with-server-response
     152           (log (with-server-responses
    153153                 (lambda ()
    154154                   (with-input-from-request
    155155                    "http://example.com"
     
    158158                                filename: "str")
    159159                      ("more" . stuff))
    160160                    read-string))
     161                 (conc "HTTP/1.0 301 Moved Permanently\r\n"
     162                        "Location: http://example.org/different/path\r\n"
     163                        "Content-Length: 8\r\n\r\nIgnored!")
    161164                 "HTTP/1.0 200 OK\r\n\r\n"))
    162165           (req (log-request log))
    163166           (h (request-headers req))