swift-server / swift-server/async-http-client
HTTPBin ignores all channel errors on the server side
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
Right now, the HTTPBin ignores all channel errors on the server side.
That's bad for multiple reasons:
- most servers that encounter protocol errors from the client just close the connection
- we can't make sure the server is happy
I think the default behaviour of HTTPBin should be that it runs an XCTFail("server error") and closes the connection. However for tests that expect server failures, this should be configurable.
Fixing this issue means:
- having
HTTPBinhave a configuration property(?) that can change the behaviour - making
HTTPBinHandlerimplementfunc errorCaught.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating HTTPBin and HTTPBinHandler, then inspect how channel errors are currently handled or ignored. Add configurable behavior so the default fails with XCTFail("server error") and closes the connection, while tests expecting server failures can opt out; verify the relevant HTTPBin tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100