On 2022-05-28 14:45 +0000, Sam Lee wrote: > Is there a bug in MIT Scheme, or is there something wrong with my code?
In MIT Scheme 11.2, many procedures in src/runtime/http-io.scm and src/runtime/http-syntax.scm are broken. Procedures such as "write-http-request" [1] and "write-http-response" [2] are obviously broken. Both of them use "write-u8" and "newline" to write to the same port, which is guaranteed to cause an error because "write-u8" expects a binary port, while "newline" expects a textual port. I hope HTTP functionality will be fixed in the next release of MIT Scheme. Perhaps unit tests should be added to prevent these kinds of regressions. [1]: https://git.savannah.gnu.org/cgit/mit-scheme.git/tree/src/runtime/http-io.scm?h=release-11.2#n152 [2]: https://git.savannah.gnu.org/cgit/mit-scheme.git/tree/src/runtime/http-io.scm?h=release-11.2#n183