﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32159	AsyncTestClient does not respect extra headers.	Ryan Vinzent	Carlton Gibson	"In the test client documentation, it states
>CGI specification
>
>The headers sent via `**extra` should follow CGI specification. For example, emulating a different “Host” header as sent in the HTTP request from the browser to the server should be passed as `HTTP_HOST`.

This simply does not work for `AsyncTestClient`, even though the documentation states the async client should behave the same as the regular test client.

This somehow works to assign a request header:

{{{
client = AsyncTestClient(HTTP_AUTHORIZATION=""Bearer faketoken"")
await client.get(""/api/my-endpoint"")
}}}

but this does not work:

{{{
client = AsyncTestClient()
await client.get(""/api/my-endpoint"", HTTP_AUTHORIZATION=""Bearer faketoken"")
}}}

Both of these examples work with the normal `Client` so they should also work with the `AsyncClient` as is documented.
"	Bug	closed	Testing framework	3.1	Release blocker	fixed	AsyncTestClient, AsyncRequestFactory	Andrew Godwin Carlton Gibson	Ready for checkin	1	0	0	0	0	0
