Remove AgentBuilder::set headers

The headers are not scoped by host, which means using them for
something like `Authorization` would effectively "leak" to all
requests using the agent.

Context:
https://github.com/algesten/ureq/issues/203#issuecomment-716385310
This commit is contained in:
Martin Algesten
2020-10-30 06:16:07 +01:00
parent d83de53bcd
commit e37acc85b2
3 changed files with 1 additions and 55 deletions

View File

@@ -56,12 +56,11 @@ impl fmt::Debug for Request {
impl Request {
pub(crate) fn new(agent: Agent, method: String, url: String) -> Request {
let headers = agent.headers.clone();
Request {
agent,
method,
url,
headers,
headers: vec![],
return_error_for_status: true,
query: QString::default(),
}