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

[WebProfilerBundle] Improved cookie traffic#20567

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:masterfromro0NL:wdt/cookies
Mar 22, 2017
Merged

[WebProfilerBundle] Improved cookie traffic#20567

fabpot merged 1 commit intosymfony:masterfromro0NL:wdt/cookies
Mar 22, 2017

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedNov 19, 2016
edited
Loading

QA
Branch?"master"
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketscomma-separated list of tickets fixed by the PR, if any
LicenseMIT
Doc PRreference to the documentation PR, if any

image

Relates to#20569 in terms of gettingall the cookies.

ogizanagi, linaori, chalasr, sstok, and Nicofuma reacted with thumbs up emoji
@ogizanagi
Copy link
Contributor

Shouldn't the header bag part (the bug fix) be in a separated PR targeting older branches ?

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedNov 19, 2016
edited
Loading

And of course this is one of those files that is different in all branches (bag.html.twig), making it hard to merge this approach upstream (as we would need to modifyheaderbag.html.twig as well)...

Ie. the bug is fixed by a new feature :)


{%blockbody %}
{%forkeyinbag.keys|sort %}
{%forvaluein bag.get(key, [],false) %}
Copy link
Contributor

Choose a reason for hiding this comment

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

On the request panel, what about keeping one line by header but exposing the value as an array if needed instead?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Considered it :) however what i like about this, it shows headers more or less the same as the HTTP message itself.

This goes for allHeaderBag's btw, as we cannot callbag.get(key, [], false) on aParamaterBag (hence the new template file).

@nicolas-grekas
Copy link
Member

Displaying multiple HTTP headers should be fixed in#20595.

@ro0NL
Copy link
ContributorAuthor

Do you think the cookie panel is viable? I tend to like it (cookies shown as data objects that is).

I can update the PR to only include that.. so multiple header fixes goes with#20595 ?

@ro0NLro0NL changed the title[WebProfilerBundle] Display multiple HTTP headers + improved cookie traffic[WebProfilerBundle] Improved cookie trafficNov 22, 2016
@nicolas-grekasnicolas-grekas added this to the3.x milestoneDec 6, 2016
$cookies[] =$this->getCookieHeader($cookie->getName(),$cookie->getValue(),$cookie->getExpiresTime(),$cookie->getPath(),$cookie->getDomain(),$cookie->isSecure(),$cookie->isHttpOnly());
}
if (count($cookies) >0) {
$responseHeaders['Set-Cookie'] =$cookies;
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@fabpot now#20569 is merged, we should not forget to update this.. i kinda did ;-) and it will cause duplicate headers i guess.

Copy link
ContributorAuthor

@ro0NLro0NLDec 18, 2016
edited
Loading

Choose a reason for hiding this comment

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

And perhaps fixup 2.7 first with#20599

fabpot added a commit that referenced this pull requestDec 22, 2016
This PR was merged into the 3.3-dev branch.Discussion----------[HttpKernel] Continuation of#20569| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#20567 (comment)| License       | MIT| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->Forgotten in#20569 and makes#20567 truly a feature only.Before![image](https://cloud.githubusercontent.com/assets/1047696/21361738/971e4f8e-c6e5-11e6-8b08-8a5f8ab4f1f0.png)After![image](https://cloud.githubusercontent.com/assets/1047696/21361752/a6dc5380-c6e5-11e6-9f18-3bc3d7db94be.png)Commits-------e1616b3 [HttpKernel] Continuation of#20569
@ro0NL
Copy link
ContributorAuthor

@javiereguiluz now all the cookie hassle is fixed.. WDYT? (bug label can be removed)

@fabpot
Copy link
Member

@javiereguiluz Can you review this PR? Is it ok for you?

@javiereguiluzjaviereguiluz self-assigned thisMar 1, 2017
@fabpot
Copy link
Member

@ro0NL Can this one be merged?

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedMar 22, 2017
edited
Loading

@fabpot for me yes :) rebased and updated. Waiting for travis.

@fabpot
Copy link
Member

@ro0NL Apparently, that breaks the tests.

<h3class="tab-title">Cookies</h3>

<divclass="tab-content">
<h3>Cookies Received</h3>

Choose a reason for hiding this comment

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

Just asking: would the following changes make this easier to understand?

Instead ofCookies Received ->Request Cookies and
instead ofCookies Created ->Response Cookies

Copy link
ContributorAuthor

@ro0NLro0NLMar 22, 2017
edited
Loading

Choose a reason for hiding this comment

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

No strong opinion.. i think i've tried to avoid those terms because of theRequest | Response tabs already on the left (which also shows the cookies as raw headers). This is more the makeup version :)

But maybe you're right...

Copy link
Member

Choose a reason for hiding this comment

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

I think@javiereguiluz is right.

Choose a reason for hiding this comment

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

The problem is that if I read "Cookies Received" I may wonder: "received by my server" (request cookies) or "received by the user [from our server]" (response cookies)

And the same for "Cookies Created" -> "created by the user and sent to us" ... "or created by the server and sent to the client" ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Updated :)

javiereguiluz reacted with thumbs up emoji
@ro0NL
Copy link
ContributorAuthor

ro0NL commentedMar 22, 2017
edited
Loading

Yeah im looking at it. Problem is asserting collected response cookies, due the var cloning thingy. It now happens at root level (https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php#L145) making it nearly impossible to mock.

For now i added only an additionalinstance of assertion, basically what we do for other public methods.

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

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

👍 I left a minor comment about a possible rewording ... but the rest looks OK to me. Thanks@ro0NL

@fabpot
Copy link
Member

Thank you@ro0NL.

@fabpotfabpot merged commit171c6d1 intosymfony:masterMar 22, 2017
fabpot added a commit that referenced this pull requestMar 22, 2017
This PR was merged into the 3.3-dev branch.Discussion----------[WebProfilerBundle] Improved cookie traffic| Q             | A| ------------- | ---| Branch?       | "master"| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | comma-separated list of tickets fixed by the PR, if any| License       | MIT| Doc PR        | reference to the documentation PR, if any![image](https://cloud.githubusercontent.com/assets/1047696/20455635/a033a814-ae60-11e6-8500-e60146f4619e.png)Relates to#20569 in terms of getting _all_ the cookies.Commits-------171c6d1 [WebProfilerBundle] Improved cookie traffic
@ro0NLro0NL deleted the wdt/cookies branchMarch 22, 2017 21:37
@nicolas-grekasnicolas-grekas modified the milestones:3.x,3.3Mar 24, 2017
@fabpotfabpot mentioned this pull requestMay 1, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

+1 more reviewer

@HeahDudeHeahDudeHeahDude left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

@javiereguiluzjaviereguiluz

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

7 participants

@ro0NL@ogizanagi@nicolas-grekas@fabpot@javiereguiluz@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp