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] Fix cookie to string conversion for raw cookies#20910

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

Closed
ro0NL wants to merge3 commits intosymfony:3.1fromro0NL:http-foundation/raw-cookie
Closed

[HttpFoundation] Fix cookie to string conversion for raw cookies#20910

ro0NL wants to merge3 commits intosymfony:3.1fromro0NL:http-foundation/raw-cookie

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedDec 13, 2016
edited
Loading

QA
Branch?3.1
Bug fix?yes
New feature?not really
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#20569 (comment)
LicenseMIT
Doc PRsymfony/symfony-docs#...

Separated from#20569

This mimics PHP'ssetrawcookie behavior.

if ($this->path) {
$str .='; path='.$this->path;
}
$str .='; path='.$this->getPath() ?:'/';
Copy link
ContributorAuthor

@ro0NLro0NLDec 13, 2016
edited
Loading

Choose a reason for hiding this comment

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

See#20569 (comment) for my reasoning behind this. Im also fine withif ($this->getPath()) { ... } in case the user breaks thecontract from a subclass.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer to keep the condition to keep the payload small (I know thatpath= / is not that long, but as this is optional, let's do it that way).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Agree. However source of the problem ishttps://github.com/symfony/symfony/pull/20910/files#diff-a1e299c557d5ff5fde6fa480eab85d47R70

If it's truly optional (and it is :)) symfony should make no assumptions on empty values. Imo. passing$path=null,$path='',$path='/' should all behave as expected, respectively;<no-path>,path=;,path=/;

Perhaps something to look into later on. For now ill put back the condition 👍

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Updated.

@ro0NL
Copy link
ContributorAuthor

Failing test (PHP7/redis) seems unrelated.

@fabpot
Copy link
Member

Thank you@ro0NL.

fabpot added a commit that referenced this pull requestDec 14, 2016
…ookies (ro0NL)This PR was squashed before being merged into the 3.1 branch (closes#20910).Discussion----------[HttpFoundation] Fix cookie to string conversion for raw cookies| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | yes| New feature?  | not really| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#20569 (comment)| License       | MIT| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->Separated from#20569This mimics PHP's `setrawcookie` behavior.Commits-------5e899cd [HttpFoundation] Fix cookie to string conversion for raw cookies
@fabpotfabpot closed thisDec 14, 2016
@ro0NLro0NL deleted the http-foundation/raw-cookie branchDecember 14, 2016 07:44
This was referencedJan 12, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@ro0NL@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp