Skip to content

[DebugBundle] Remove inlined dumps on XHR #14609

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets partially #14608
License MIT
Doc PR -

@@ -135,13 +135,12 @@ public function dump(Data $data)

public function collect(Request $request, Response $response, \Exception $exception = null)
{
if ($this->requestStack && $this->requestStack->getMasterRequest() !== $request) {
if (($this->requestStack && $this->requestStack->getMasterRequest() !== $request) || $request->isXmlHttpRequest()) {
return;
}

// In all conditions that remove the web debug toolbar, dumps are written on the output.
Copy link
Member

Choose a reason for hiding this comment

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

this comment is not really accurrate anymore

@nicolas-grekas
Copy link
Member Author

I added a check for the Origin header, so that programmatic calls (either XHR, embedded assets or CORS requests) don't break with invalid content.
This PR is ready for the first most basic round of tweaking regarding #14608
The next step is giving easy control over dumps destination, but that's for an other PR.

@jakzal
Copy link
Contributor

jakzal commented May 12, 2015

seems 👍

@xabbuh
Copy link
Member

xabbuh commented May 12, 2015

👍

1 similar comment
@aitboudad
Copy link
Contributor

👍

@nicolas-grekas nicolas-grekas merged commit d0eb208 into symfony:2.6 May 13, 2015
nicolas-grekas added a commit that referenced this pull request May 13, 2015
This PR was merged into the 2.6 branch.

Discussion
----------

[DebugBundle] Remove inlined dumps on XHR

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | partially #14608
| License       | MIT
| Doc PR        | -

Commits
-------

d0eb208 [DebugBundle] Remove inlined dumps on XHR
@nicolas-grekas nicolas-grekas deleted the no-dump-xhr branch May 13, 2015 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants