;The object #[binary-i/o-port 35], passed as an argument to write-char, is not the correct type.
This error is raised in the string->tokens procedure in runtime/http-syntax.scm. write-char expects a textual port but we have a binary port.
Are you sure about this part?
https://ftp.gnu.org/gnu/mit-scheme/stable.pkg/11.2/
Unless I'm missing something the only write-char in string->tokens uses a port created by open-output-string:
(let ((port (open-output-string)))
(lambda (#!optional char)
(if (default-object? char)
(get-output-string! port)
(write-char char port))))))
Returns a textual output port that will accumulate characters for retrieval by get-output-string.
Perhaps a different write-char call is involved.