Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Prevent PHP from sending Last-Modified on session start#24878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:3.4fromnicolas-grekas:fix-session
Nov 9, 2017

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#24849
LicenseMIT
Doc PR-

I really don't know why PHP sends this Last-Modified header.
Let's bypass that and throw headers ourselves instead.

Copy link
Contributor

@srozesroze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The approach definitely makes sense to me 👍

publicfunctionopen($savePath,$sessionName)
{
$this->sessionName =$sessionName;
if (!headers_sent() && !ini_get('session.cache_limiter')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Shouldn't we raise a warning or something in!ini_get('session.cache_limiter') && headers_sent() ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

not sure, there are many similar checks in the code base already

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Well,this one convinced me... 😅

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit2c0dc74 intosymfony:3.4Nov 9, 2017
fabpot added a commit that referenced this pull requestNov 9, 2017
… session start (nicolas-grekas)This PR was merged into the 3.4 branch.Discussion----------[HttpFoundation] Prevent PHP from sending Last-Modified on session start| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#24849| License       | MIT| Doc PR        | -I really don't know why PHP sends this Last-Modified header.Let's bypass that and throw headers ourselves instead.Commits-------2c0dc74 [HttpFoundation] Prevent PHP from sending Last-Modified on session start
@nicolas-grekasnicolas-grekas deleted the fix-session branchNovember 9, 2017 15:06

$options +=array(
'cache_limiter' =>'private_no_expire',
'cache_limiter' =>'',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

the phpdoc with the standard options is wrong now

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

fixed incf4eb46

This was referencedNov 12, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+2 more reviewers

@TobionTobionTobion left review comments

@srozesrozesroze left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@fabpot@Tobion@sroze@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp