http icon indicating copy to clipboard operation
http copied to clipboard

[http_client_conformance_tests] Add close behavior test

Open Zekfad opened this issue 1 year ago • 1 comments

Coming from https://github.com/Zekfad/fetch_client/issues/18

I've fixed issue on a client implementation end but it hints that there should be a test that closing client cleans up it and terminates associated connections.

Also this is mostly the same for recently merged #1191

Zekfad avatar May 04 '24 13:05 Zekfad

Great idea!

brianquinlan avatar May 23 '24 23:05 brianquinlan

@brianquinlan is there any consensus for cancel behavior? I have cancel capability in fetch_client (via response class) and currently it has unclear semantics: it can throw ClientException when transmitted data < content-lenght, and may complete normally if there are no content length. Also same applies when client is closed.

Should I always eagerly throw ClientException when request is cancelled, including in progress requests that are cancelled as result of closing client?

And what semantics of existing implementations (xhr, cupertino, cronet)?

Zekfad avatar Jan 05 '25 08:01 Zekfad