Skip to content

Hunchentoot fails on Clasp 2.7.0: socket stream is not binary (usocket 0.8.8) #1744

@logoraz

Description

@logoraz

Describe the bug
Hunchentoot fails to process connections on Clasp 2.7.0 with the error "Not a binary stream". Clasp's socket stream implementation does not return a binary stream as required by hunchentoot.

Expected behavior
Starting a Hunchentoot acceptor and connecting via browser should serve HTTP responses normally, as it does on SBCL.

Actual behavior
Every incoming connection produces the following error:

[ERROR] Error while processing connection: Not a binary stream
;;; Warning: set-timeouts unimplemented.

The connection is reset and no HTTP response is served.

Code at issue

(asdf:load-system :hunchentoot)
(hunchentoot:start (make-instance 'hunchentoot:easy-acceptor :port 8081))
;; Then navigate to http://localhost:8081 in a browser

Other steps to reproduce

  1. Install Clasp 2.7.0
  2. Ensure usocket 0.8.8 is available via ocicl or quicklisp
  3. Load and start Hunchentoot as above
  4. Navigate to http://localhost:8081 in any browser
  5. Observe "Not a binary stream" error repeated for every connection attempt

Context
Clasp version: 2.7.0
usocket version: 0.8.8
Operating system: NixOS Linux x86-64
The socket stream returned by Clasp's usocket backend is not a binary stream, causing Hunchentoot's call to flexi-streams:make-flexi-stream to fail. This also prevents CLOG-based applications from running on Clasp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions