{% set status_code = request_collector ? request_collector.statuscode|default(0) : 0 %} {% set css_class = status_code > 399 ? 'status-error' : status_code > 299 ? 'status-warning' : 'status-success' %} {% if request_collector and request_collector.redirect %} {% set redirect = request_collector.redirect %} {% set link_to_source_code = redirect.controller.class is defined ? redirect.controller.file|file_link(redirect.controller.line) %} {% set redirect_route_name = '@' ~ redirect.route %}
{{ source('@WebProfiler/Icon/redirect.svg') }} {{ redirect.status_code }} redirect from {{ redirect.method }} {% if link_to_source_code %} {{ redirect_route_name }} {% else %} {{ redirect_route_name }} {% endif %} ({{ redirect.token }})
{% endif %}
{% if status_code > 399 %}

{{ source('@WebProfiler/Icon/alert-circle.svg') }} Error {{ status_code }} {{ request_collector.statusText }}

{% endif %}

{{ profile.method|upper }} {% set profile_title = profile.url|length < 160 ? profile.url : profile.url[:160] ~ '…' %} {% if profile.method|upper in ['GET', 'HEAD'] %} {{ profile_title }} {% else %} {{ profile_title }} {% endif %}

{% if status_code < 400 %}
Response
{{ status_code }} {{ request_collector.statusText }}
{% endif %} {% set referer = request_collector ? request_collector.requestheaders.get('referer') : null %} {% if referer %}
{{ source('@WebProfiler/Icon/referrer.svg') }} Browse referrer URL
{% endif %}
IP
{{ profile.ip }}
Profiled on
Token
{{ profile.token }}
{% if request_collector and request_collector.forwardtoken -%} {% set forward_profile = profile.childByToken(request_collector.forwardtoken) %} {% set controller = forward_profile ? forward_profile.collector('request').controller : 'n/a' %}
{{ source('@WebProfiler/Icon/forward.svg') }} Forwarded to {% set link = controller.file is defined ? controller.file|file_link(controller.line) : null -%} {%- if link %}{% endif -%} {% if controller.class is defined %} {{- controller.class|abbr_class|striptags -}} {{- controller.method ? ' :: ' ~ controller.method -}} {% else %} {{- controller -}} {% endif %} {%- if link %}{% endif %} ({{ request_collector.forwardtoken }})
{%- endif %}