aaron-y-chen commented on code in PR #70960:
URL: https://github.com/apache/airflow/pull/70960#discussion_r3710172842
##########
providers/http/src/airflow/providers/http/hooks/http.py:
##########
@@ -218,6 +246,9 @@ def get_conn(
def _set_base_url(self, connection) -> None:
host = connection.host or self.default_host
schema = connection.schema or "http"
+ extra = connection.extra_dejson
+ self._srv_lookup_enabled = to_boolean(str(extra.get("srv_lookup",
False)))
+ self._srv_cache_ttl = float(extra.get("srv_cache_ttl",
self._srv_cache_ttl))
Review Comment:
Could we remove `srv_lookup` and `srv_cache_ttl` from `conn_extra_options`
before applying the remaining connection extras as headers? Since these values
are read with `get()`, they remain in `conn_extra_options` and are passed to
`session.headers` here. When preparing the request, `requests` rejects their
boolean and numeric values as invalid header values. The async path appears to
have the same issue.
https://github.com/apache/airflow/blob/07f26a6f89cb35324aa6514fe1074bd081483cca/providers/http/src/airflow/providers/http/hooks/http.py#L327-L339
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]