<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:186453213;
mso-list-type:hybrid;
mso-list-template-ids:1241394238 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style></head><body lang=en-SE link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Thanks so much Dmitry & Sergey,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I did not catch this earlier since dumping r.variables was empty, only by explicitly accessing the request_uri property I was now able to get what I needed.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Very excited to move forward with this </span><span lang=EN-US style='font-family:"Segoe UI Emoji",sans-serif'>😊</span><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Gunter</span><span lang=EN-US> </span></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='border:none;padding:0cm'><b>From: </b><a href="mailto:xeioex@nginx.com">Dmitry Volyntsev</a><br><b>Sent: </b>Wednesday, 28 April 2021 15:17<br><b>To: </b><a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a>; <a href="mailto:gunter@grodotzki.com">Gunter Grodotzki</a><br><b>Subject: </b>Re: njs: get raw requestURI or full querystring</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 28.04.2021 16:12, Gunter Grodotzki wrote:</p><p class=MsoNormal>> sadly the whole object is empty. no key / no value.</p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>><o:p> </o:p></p><p class=MsoNormal>Try the following variable</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http://nginx.org/en/docs/http/ngx_http_core_module.html#var_request_uri</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>decodeURIComponent(r.variables.request_uri.split('?')[1])</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>in njs CLI</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> >> </p><p class=MsoNormal>decodeURIComponent("https://url.rw/?https%3A%2F%2Flifeofguenter.de".split('?')[1])</p><p class=MsoNormal>'https://lifeofguenter.de'</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>>> On 28 Apr 2021, at 14:17, Sergey A. Osokin <osa@freebsd.org.ru> wrote:</p><p class=MsoNormal>>><o:p> </o:p></p><p class=MsoNormal>>> On Wed, Apr 28, 2021 at 07:45:37AM +0200, Gunter Grodotzki wrote:</p><p class=MsoNormal>>>> Unfortunately r.args is empty if no key/value pair is given.</p><p class=MsoNormal>>> Well, the r.args is empty in case of an emptyness of a querystring.</p><p class=MsoNormal>>><o:p> </o:p></p><p class=MsoNormal>>> But we have a bit different case when URL contains a query</p><p class=MsoNormal>>> string with a key, but without a value for that one,</p><p class=MsoNormal>>> i.e. "https://url.rw/?https%3A%2F%2Flifeofguenter.de".</p><p class=MsoNormal>>><o:p> </o:p></p><p class=MsoNormal>>> So, the "https%3A%2F%2Flifeofguenter.de" is the key and its value</p><p class=MsoNormal>>> is empty.</p><p class=MsoNormal>>><o:p> </o:p></p><p class=MsoNormal>>> -- </p><p class=MsoNormal>>> Sergey Osokin</p><p class=MsoNormal>>> _______________________________________________</p><p class=MsoNormal>>> nginx-devel mailing list</p><p class=MsoNormal>>> nginx-devel@nginx.org</p><p class=MsoNormal>>> http://mailman.nginx.org/mailman/listinfo/nginx-devel</p><p class=MsoNormal>> _______________________________________________</p><p class=MsoNormal>> nginx-devel mailing list</p><p class=MsoNormal>> nginx-devel@nginx.org</p><p class=MsoNormal>> http://mailman.nginx.org/mailman/listinfo/nginx-devel</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>