You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pierrejeambrun (via GitHub)" <gi...@apache.org> on 2026/04/03 16:37:21 UTC
[I] Duplicate Date headers in responses [airflow]
pierrejeambrun opened a new issue, #64678:
URL: https://github.com/apache/airflow/issues/64678
### Body
It appears that the flask application is interfering and adding it's own header too.
```
$ curl -I localhost:8080/auth/static/pin_32.png
HTTP/1.1 200 OK
date: Thu, 12 Mar 2026 04:38:44 GMT <-- SENT BY uvicorn
server: uvicorn
content-disposition: inline; filename=pin_32.png
content-type: image/png
content-length: 1201
last-modified: Thu, 12 Mar 2026 01:43:44 GMT
cache-control: no-cache
etag: "1773279824.6871002-1201-1792155666"
date: Thu, 12 Mar 2026 04:38:44 GMT <-- DUPLICATE SENT BY FLASK
vary: Cookie
```
### Committer
- [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Duplicate Date headers in responses [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun closed issue #64678: Duplicate Date headers in responses
URL: https://github.com/apache/airflow/issues/64678
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Duplicate Date headers in responses [airflow]
Posted by "haseebmalik18 (via GitHub)" <gi...@apache.org>.
haseebmalik18 commented on issue #64678:
URL: https://github.com/apache/airflow/issues/64678#issuecomment-4285464613
It looks like there was a PR already merged for this #64726
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Duplicate Date headers in responses [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #64678:
URL: https://github.com/apache/airflow/issues/64678#issuecomment-4199267244
@saivarmaakireddy270-star please stop posting generic AI generated comments that obviously do not apply to our code base / use case. This doesn't bring any value and spam maintainers with notifications for now reason.
Thanks.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Duplicate Date headers in responses [airflow]
Posted by "saivarmaakireddy270-star (via GitHub)" <gi...@apache.org>.
saivarmaakireddy270-star commented on issue #64678:
URL: https://github.com/apache/airflow/issues/64678#issuecomment-4191367294
It looks like the duplicate `Date` header is being introduced because it’s being set at multiple layers (application + server/proxy).
According to the HTTP spec, the `Date` header should only be set once, and most servers (Node.js, Nginx, etc.) automatically add it. If the application code also sets it manually, it results in duplication.
**Suggested fix:**
* Remove any manual setting of the `Date` header in the application code.
* Ensure that only one layer (preferably the server/proxy) is responsible for setting it.
For example, in Node.js:
```js
// ❌ Avoid this
res.setHeader("Date", new Date().toUTCString());
```
If a reverse proxy like Nginx is involved, you can also hide the upstream header:
```nginx
proxy_hide_header Date;
```
This should ensure only a single `Date` header is present in responses and resolve the issue.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Duplicate Date headers in responses [airflow]
Posted by "laurenhall1526-netizen (via GitHub)" <gi...@apache.org>.
laurenhall1526-netizen commented on issue #64678:
URL: https://github.com/apache/airflow/issues/64678#issuecomment-4193472299
Yeah, that makes sense. Looks like both Uvicorn and Flask are adding the
Date header, which explains the duplication.
We probably shouldn’t be setting it at the app layer at all—letting the
server handle it should be enough. Might be worth checking where Flask is
injecting it in this path.
I can take a closer look if needed.
On Mon, Apr 6, 2026, 4:23 AM saivarmaakireddy270-star <
***@***.***> wrote:
> *saivarmaakireddy270-star* left a comment (apache/airflow#64678)
> <https://github.com/apache/airflow/issues/64678#issuecomment-4191367294>
>
> It looks like the duplicate Date header is being introduced because it’s
> being set at multiple layers (application + server/proxy).
>
> According to the HTTP spec, the Date header should only be set once, and
> most servers (Node.js, Nginx, etc.) automatically add it. If the
> application code also sets it manually, it results in duplication.
>
> *Suggested fix:*
>
> - Remove any manual setting of the Date header in the application code.
> - Ensure that only one layer (preferably the server/proxy) is
> responsible for setting it.
>
> For example, in Node.js:
>
> // ❌ Avoid thisres.setHeader("Date", new Date().toUTCString());
>
> If a reverse proxy like Nginx is involved, you can also hide the upstream
> header:
>
> proxy_hide_header Date;
>
> This should ensure only a single Date header is present in responses and
> resolve the issue.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/airflow/issues/64678#issuecomment-4191367294>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/B7IHA43T6CXAC64F7PSKJRD4UNZQHAVCNFSM6AAAAACXL6QPQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOJRGM3DOMRZGQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Duplicate Date headers in responses [airflow]
Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on issue #64678:
URL: https://github.com/apache/airflow/issues/64678#issuecomment-4287563377
Thanks @haseebmalik18 for pointing that, indeed this was fixed.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org