Description
When lava (e.g., {{ param }}) is included in httpresponse HX-Redirect header, extraneous spaces end up in the redirect path/header that result in %20s in the URL causing a redirect failure.
Given the following:
{% assign param='ABCD' %}
{% httpresponse %}
[[ header key:'HX-Redirect' ]]/Entry/{{ param }}?New=True[[ endheader ]]
{% endhttpresponse %}
Actual Behavior
Attempts to redirect to:
/Entry/%20ABCD%20?New=True
Expected Behavior
Redirect to:
/Entry/ABCD?New=True
Steps to Reproduce
{% assign param='ABCD' %}
{% httpresponse %}
[[ header key:'HX-Redirect' ]]/Entry/{{ param }}?New=True[[ endheader ]]
{% endhttpresponse %}
Note, the following workaround avoids this issue:
{% assign param='ABCD' %}
{% httpresponse %}
[[ header key:'HX-Redirect' ]]{{ param | Prepend:'/Entry/' | Append:'?New=True' }}[[ endheader ]]
{% endhttpresponse %}
Issue Confirmation
Rock Version
16.10
Description
When lava (e.g.,
{{ param }}) is included in httpresponse HX-Redirect header, extraneous spaces end up in the redirect path/header that result in%20s in the URL causing a redirect failure.Given the following:
Actual Behavior
Attempts to redirect to:
/Entry/%20ABCD%20?New=TrueExpected Behavior
Redirect to:
/Entry/ABCD?New=TrueSteps to Reproduce
Note, the following workaround avoids this issue:
Issue Confirmation
Rock Version
16.10