{% set hasReachedBody = false %} {% set content = '' %} {% set data = data|split("\n")|slice(1) %} {% set xdebugTokenLink = data|filter(v => 'x-debug-token-link:' in v|lower)|first|split(': ')|last %} {% set noContent = capturedBodyLength is same as(0) ? '(captured_body_length is set to 0, no body captured)' : '(This message has no captured body)' %} {% for row in data %} {% if row is empty %} {% set hasReachedBody = true %} {% elseif hasReachedBody %} {% set content = content ~ row %} {% else %} {% set row = row|split(':') %} {% set value = row|slice(1)|join(':')|trim %} {% endif %} {% endfor %}
{{ header }}{% if xdebugTokenLink %} Profile link{% endif %}
{{ row[0] }} {% if value matches '#^https?://#' %} {{ value }} {% else %} {{ value }} {% endif %}
{{ content ? content|httplug_markup_body : noContent }}