Summary
spiffy does not flush output port
Metadata
- Id: 59b85f6f7ed6991ee5a2998fa883752f23865b8f
- Trac id: 1579
- Type: defect
- Reporter: zbigniew
- Owner:
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty: easy
- Resolution: fixed
- Priority: major
- Milestone: someday
- Version: 5.0.0
- Changetime: 2019-01-17 22:51:25 UTC
- Created: 2019-01-17 19:28:54 UTC
- Keywords: spiffy
Attachments
- 59b85f6f7ed6991ee5a2998fa883752f23865b8f/attachments/0001-Use-port-closed-instead-of-sys-slot-fixing-output-ha.patch
Description
Port slot 8 (closed?) changed from a bool to a fixnum in Chicken 5, which made the existing port closed test in handle-incoming-request always succeed, so output was never flushed.
This can lead to hangs when output size is less than tcp-buffer-size. This behavior was observed in chickadee when output size < 1024, including on simple responses like 302 redirects.
Fix is to use the official accessor instead, which seems to work fine. I'm not sure if this was a legacy thing, but other procedures in the spiffy code use port-closed?.
Patch is attached.
Changes and comments
[2019-01-17 19:29:15 UTC] zbigniew attached 0001-Use-port-closed-instead-of-sys-slot-fixing-output-ha.patch (description=#f)
[2019-01-17 22:24:56 UTC] sjamaan changed status from new to closed
[2019-01-17 22:24:56 UTC] sjamaan set resolution to fixed
[2019-01-17 22:24:56 UTC] sjamaan wrote:
Thanks! This is a bizarre one. I have no idea why I was using the low-level accessor instead of `port-closed?`. Presumably it wasn't exposed at the time (this line was added in 2010)?
Anyway, should be fixed with Spiffy 6.2
[2019-01-17 22:51:25 UTC] mario wrote:
Probably. port-closed? was added in 4.6.0 (released in 2010-09).