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

Use rawurlencode() to transform the Cookie into a string#23461

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
javiereguiluz wants to merge3 commits intosymfony:2.7fromjaviereguiluz:fix_23255

Conversation

@javiereguiluz
Copy link
Member

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

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneJul 10, 2017
@nicolas-grekas
Copy link
Member

Cookie in BrowserKit has the same issue isn't it?

@javiereguiluz
Copy link
MemberAuthor

javiereguiluz commentedJul 10, 2017
edited
Loading

@nicolas-grekas I've made that change too. However, when copying thetestToString() test from HttpFoundation, I needed to fix all tests because the results are pretty different from the HttpFoundation tests. Are those differences expected?

Examples:

$cookie =newCookie('foo','bar',strtotime('Fri, 20-May-2011 15:25:52 GMT'),'/','.myfoodomain.com',true);// in HttpFoundation(string)$cookie ='foo=bar; expires=Fri, 20 May 2011 15:25:52 GMT; domain=.myfoodomain.com; path=/; secure; httponly'// in BrowserKit(string)$cookie ='foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure; httponly'
$cookie =newCookie('foo','bar',0,'/','');// in HttpFoundation(string)$cookie ='foo=bar; path=/; httponly'// in BrowserKit(string)$cookie ='foo=bar; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; httponly'

{
if ($encodedValue) {
$this->value =urldecode($value);
$this->value =rawurldecode($value);
Copy link
Contributor

@ro0NLro0NLJul 10, 2017
edited
Loading

Choose a reason for hiding this comment

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

if we update decoding,Cookie::fromString in HttpFoundation should probably be updated as well, note howeverurldecode works forrawurlencode perfectly fine, so im not sure we should change it (givenrawurldecode doesnt work forurlencode).

Copy link
Member

@nicolas-grekasnicolas-grekasJul 10, 2017
edited
Loading

Choose a reason for hiding this comment

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

works for me, we can keepurldecode here

@stof
Copy link
Member

@javiereguiluz your first example outputs the same cookie. Attributes are just given in a different order. But order is not meaningful.

@javiereguiluz
Copy link
MemberAuthor

@stof yes, the first example is the same, but with a different ordering. But I think it should be exactly the same. The attention a project pays to details like this says a lot about a project 😄

@nicolas-grekas
Copy link
Member

Thank you@javiereguiluz.

nicolas-grekas added a commit that referenced this pull requestJul 11, 2017
…javiereguiluz)This PR was squashed before being merged into the 2.7 branch (closes#23461).Discussion----------Use rawurlencode() to transform the Cookie into a string| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#23255| License       | MIT| Doc PR        | -Commits-------025dfff Use rawurlencode() to transform the Cookie into a string
@fabpotfabpot closed thisJul 11, 2017
This was referencedJul 17, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@ro0NLro0NLro0NL approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

6 participants

@javiereguiluz@nicolas-grekas@stof@ro0NL@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp