I have an web agent which passes the value “&ID=;[ECO-CS]” to a document. But by the time the value gets to the document, it reads “&ID=;%5BECO-CS%5D”
Does anyone know why this is or how to fix it. We just upgraded our server to 6.01 last night, and this is inhibiting access to our website.
Thanks,
Chris
Subject: Query_String value being changed – why?
“&ID=;%5BECO-CS%5D” has the “[” and “]” converted to hexadecimal. You can verify this by using the Windows calculator to convert 5B and 5D to decimal, 91 and 93 respectively. Then go to a DOS prompt, hold down the ALT key, and enter 091 or 093. There’s the characters you intended. The per cent sign is the indicator of a hex value to follow. When you bring in the query string, parse for the per cent sign, removing it and converting the following two characters via Chr$(), and add the resulting character in place of those two after the per cent sign.
Failing all that, just use Query_String_Decoded! It does it for you. Read the help once before posting here, maybe, especially searching for “Table of CGI variables” in this instance.
Subject: RE: Query_String value being changed – why?
Thanks, Victor. The main issue was that this encoding of brackets is new with ND6 – in R5, the Query_String CGI variable didn’t encode the brackets.
Actually, when I called the document with the Query_STring parameters (which included the brackets) directly from the addressbar of my browser, the Query_String variable wasn’t encoded. It turns out it was encoded by Domino (new to this release) before calling the document from the agent (which was called with a simple “Print” statement of the url).
Thanks again for the reply. I ended up just parsing out the hexadecimal. Your solution of using a different variable (Query_String_Decoded) is much better!
Chris
Subject: RE: Query_String value being changed – why?
You’re welcome. I’ll email you a NSF with a form I find useful. It displays a table of all the CGI variables, in the context of the server it’s running on. Call it:
and you’ll see how yours behaves.
Subject: RE: Query_String value being changed – why?
Thanks for the file, Victor!