File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Symfony/Component/HttpKernel/DataCollector Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -135,13 +135,13 @@ public function dump(Data $data)
135
135
136
136
public function collect (Request $ request , Response $ response , \Exception $ exception = null )
137
137
{
138
- if ($ this ->requestStack && $ this ->requestStack ->getMasterRequest () !== $ request ) {
138
+ // Sub-requests and programmatic calls stay in the collected profile.
139
+ if (($ this ->requestStack && $ this ->requestStack ->getMasterRequest () !== $ request ) || $ request ->isXmlHttpRequest () || $ request ->headers ->has ('Origin ' )) {
139
140
return ;
140
141
}
141
142
142
- // In all conditions that remove the web debug toolbar, dumps are written on the output.
143
+ // In all other conditions that remove the web debug toolbar, dumps are written on the output.
143
144
if (!$ this ->requestStack
144
- || $ request ->isXmlHttpRequest ()
145
145
|| !$ response ->headers ->has ('X-Debug-Token ' )
146
146
|| $ response ->isRedirection ()
147
147
|| ($ response ->headers ->has ('Content-Type ' ) && false === strpos ($ response ->headers ->get ('Content-Type ' ), 'html ' ))
You can’t perform that action at this time.
0 commit comments