Skip to content

Commit 4d1ca68

Browse files
authored
Merge pull request #471 from php-http/1-to-2
1 to 2
2 parents 578486b + 9ddc2b4 commit 4d1ca68

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

src/Resources/views/stack.html.twig

+8-10
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
{% endif %}
88
<span class="label httplug-method httplug-method-{{ stack.requestMethod|lower }}">{{ stack.requestMethod }}</span>
99
</div>
10-
{% apply spaceless %}
11-
<div class="label httplug-stack-header-target">
12-
<span class="httplug-scheme">{{ stack.requestScheme }}://</span>
13-
<span class="httplug-host">{{ stack.requestHost }}</span>
14-
{% if stack.requestPort not in [null, 80, 443] %}
15-
<span class="httplug-port">:{{ stack.requestPort }}</span>
16-
{% endif %}
17-
<span class="httplug-target">{{ (stack.requestTarget|default('/') starts with '/' ? '' : '/') ~ stack.requestTarget }}</span>
18-
</div>
19-
{% endapply %}
10+
<div class="label httplug-stack-header-target">
11+
<span class="httplug-scheme">{{ stack.requestScheme }}://</span>
12+
<span class="httplug-host">{{ stack.requestHost }}</span>
13+
{% if stack.requestPort not in [null, 80, 443] %}
14+
<span class="httplug-port">:{{ stack.requestPort }}</span>
15+
{% endif %}
16+
<span class="httplug-target">{{ (stack.requestTarget|default('/') starts with '/' ? '' : '/') ~ stack.requestTarget }}</span>
17+
</div>
2018
<div>
2119
<span class="label httplug-duration">{{ stack.duration|number_format }} ms</span>
2220
{% if stack.responseCode >= 400 and stack.responseCode <= 599 %}

tests/Functional/ProfilerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testShowProfiler(): void
2828
$client->request('GET', '/_profiler/latest?panel=httplug');
2929
$content = $client->getResponse()->getContent();
3030
$this->assertStringContainsString(<<<HTML
31-
<div class="label httplug-stack-header-target"><span class="httplug-scheme">https://</span><span class="httplug-host">jsonplaceholder.typicode.com</span><span class="httplug-target">/posts/1</span></div>
31+
<span class="httplug-host">jsonplaceholder.typicode.com</span>
3232
HTML, $content);
3333
}
3434
}

0 commit comments

Comments
 (0)