apple / apple/swift-http-api-proposal

Fix one/zero byte request body issues in URLSession

Open
#112 0 comments 0 reactions 0 assignees View on GitHub
http-client
Dominant language
Swift
Stars
66
Forks
21
Avg merge
7h 39m
Merged PRs (30d)
2

Description

The echo, speak and empty chunked body tests are currently disabled for URLSession which does not pass these tests.

URLSession has issues with bi-directional streaming support:
* URLSession does not write 1-byte chunks out on the wire (occurs in speak and echo case)
* URLSession hangs when the request outlives the response (occurs in speak case)
* URLSession does not send the terminating chunk for a zero-length response body (occurs in empty chunked body case)

We need to root-cause the issue in URLSession or its API implementation and fix it, so that these tests can be re-enabled.

Contributor guide

Open the contributing guide

Research direction

Locate the disabled echo, speak, and empty chunked body tests and the URLSession API implementation they exercise. Compare the one-byte, request-lifetime, and terminating-chunk behavior, then verify that the root cause is fixed and all three tests can be re-enabled and pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.