🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@4513
Copy link
Contributor

@4513 4513 commented Nov 24, 2025

Q A
Branch? 7.3
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

This PR fixes name of the HTTP response header 'Expires' for Event Stream Response, which is currently missing an 's'. Because of the typo, a server may assume that the 'Expires' header is not set and add its own one.

There may be an old agents that do not check Cache-Control and only use value of Expires header, leading into incorrect caching of the response. Some servers tend to set Expires value to a future.

This fix is applicable to 7.3, 7.4, 8.x. The SSE has not been implemented before 7.3 and is not present in 6.x.

One of the responses when using SSE (notice the expire and the expires headers):

HTTP/2 200 
cache-control: max-age=0, must-revalidate, no-cache, no-store, private
x-accel-buffering: no
pragma: no-cache
expire: 0
date: Mon, 24 Nov 2025 17:01:30 GMT
cache-control: max-age=604800
expires: Mon, 01 Dec 2025 17:01:29 GMT
content-type: text/event-stream; charset=UTF-8
server: Apache
...

WIP: Missing tests

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@4513 4513 marked this pull request as ready for review November 24, 2025 18:00
@carsonbot carsonbot added this to the 7.4 milestone Nov 24, 2025
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 8.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.4" but it seems your PR description refers to branch "7.3".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@4513 4513 changed the base branch from 7.4 to 7.3 November 25, 2025 08:04
@4513
Copy link
Contributor Author

4513 commented Nov 25, 2025

Hi there,

sorry for that, the target branch has been changed to 7.3

@nicolas-grekas nicolas-grekas force-pushed the sse_response_cache_header branch from 59419ab to b830108 Compare November 27, 2025 14:27
@nicolas-grekas
Copy link
Member

Thank you @4513.

@nicolas-grekas nicolas-grekas merged commit 8733b96 into symfony:7.3 Nov 27, 2025
This was referenced Dec 7, 2025
@4513 4513 deleted the sse_response_cache_header branch December 8, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants