swift-server / swift-server/async-http-client
Add tests for cross-origin headers
Open
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that I was able to replace the same-origin check in HTTPHandler with if true and if false and still pass all of the tests.
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 in Sources/AsyncHTTPClient/HTTPHandler.swift around line 1241 and inspect the same-origin check and its cross-origin header handling. Add tests that exercise both outcomes and ensure they fail when the check is replaced with either if true or if false; run the relevant test suite to verify the coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100