Created
November 28, 2023 16:09
-
-
Save steveosoule/22b53b8d8086339911efcb7049915489 to your computer and use it in GitHub Desktop.
Miva - mvt:call and get the Content-Length header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mvt:call action="'https://www.example.com'" method="'GET'"> | |
<mvt:assign name="l.settings:headers" value="s.callreturnheader" /> | |
</mvt:call> | |
<mvt:foreach iterator="header" array="headers"> | |
<mvt:if expr="'Content-Length:' IN l.settings:header EQ 1"> | |
<mvt:assign name="l.found" value="miva_splitstring( l.settings:header, ':', l.header_parts, 'trim' )" /> | |
<mvt:assign name="l.content_length" value="l.header_parts[2]" /> | |
</mvt:if> | |
</mvt:foreach> | |
Content-Length: <mvt:eval expr="l.content_length" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment