Skip to content

Conversation

@jscheffl
Copy link
Contributor

After we deployed Airflow 3.1.5 to our environment @AutomationDev85 and me noticed that still the WAF rules hit the deployment and debugging one level deeper revealed a logic problem of the fix applied in #57377:

The call from base class patch() to the extended Client from TaskSDK uses actually (empty) kwargs for content and header (e.g. passing content=None and header=None which then made the header not applied. See also https://github.com/encode/httpx/blob/master/httpx/_client.py#L1221

This PR corrects the logic to check for "if any content is to be submitted" and "No header for content type set". With this the content-type header is now consistently applied making our WAF happy.

@jscheffl jscheffl added this to the Airflow 3.1.6 milestone Dec 20, 2025
@jscheffl jscheffl added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Dec 20, 2025
@jscheffl jscheffl force-pushed the bugfix/add-content-type-to-task-sdk-calls-v2 branch from defacbc to fa712ba Compare December 21, 2025 08:46
@jscheffl jscheffl merged commit 288b09a into apache:main Dec 21, 2025
97 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 21, 2025
… logic (#59676)

(cherry picked from commit 288b09a)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
@github-actions
Copy link

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

jscheffl added a commit that referenced this pull request Dec 21, 2025
… logic (#59676) (#59687)

(cherry picked from commit 288b09a)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Jan 2, 2026
ephraimbuddy pushed a commit that referenced this pull request Jan 6, 2026
… logic (#59676) (#59687)

(cherry picked from commit 288b09a)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants