Re: How to use cgi param() to read unescaped url parameters
by Your Mother (Archbishop) on Oct 31, 2013 at 21:07 UTC
|
You should not make it work either way. ";" is a legal separator and if it's escaped, it's meant to be the literal character; not a super secret non-standard, literal semi-colons are now impossible, version. You should fix the code that is creating the broken URI, not create code that allows broken ones to work, because they shouldn't.
We'd love to help fix the real problem if you can show the URL generating code.
| [reply] |
|
Oh, you are so getting a ++ tomorrow.
| [reply] [d/l] |
Re: How to use cgi param() to read unescaped url parameters
by marinersk (Priest) on Oct 31, 2013 at 20:19 UTC
|
Update: Modified nearly wholesale given understanding granted by other posts
So, tests done on a generic Perl CGI engine:
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test%3bfoo=2848
|
Parameter |
|
Value |
file |
test;foo=2848 |
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test;foo=2848
|
Parameter |
|
Value |
file |
test |
foo |
2848 |
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test&foo=2848
|
Parameter |
|
Value |
file |
test |
foo |
2848 |
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test\;foo=2848
|
Parameter |
|
Value |
file |
test\ |
foo |
2848 |
So I'm afraid I don't understand the problem.
- The first technique is probably not what you were looking for.
- The second technique seems to work for me -- this was unexpected prior to reading the updates below.
- The third example is probably what you are looking for.
- The fourth example was just to see what would happen. I suppose I should have been able to predict it but I didn't.
The CGI script which generated this these results is behind the readmoretag below.
| [reply] [d/l] [select] |
|
My problem is that i send an email with this link :
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test;foo=2848
When i open the mail at thunderbird it works, when i open the mail at hotmail (chrome) it makes it
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test%3bfoo=2848
and then it doesn't work !!
| [reply] |
|
Just for kicks, try sending it with the ampersand instead of the semicolon and see what happens.
| [reply] |
Re: How to use cgi param() to read unescaped url parameters
by keszler (Priest) on Oct 31, 2013 at 20:27 UTC
|
| [reply] |
|
| [reply] |
Re: How to use cgi param() to read unescaped url parameters
by invader7 (Initiate) on Nov 01, 2013 at 12:00 UTC
|
My problem is that i send an email with this link :
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test;foo=2848
When i open the mail at thunderbird it works, when i open the mail at hotmail (chrome) it makes it
http://bhmk.com/cgi-bin/testcgiparm.pl?file=test%3bfoo=2848
and then it doesn't work !! | [reply] |
|
| [reply] |
A reply falls below the community's threshold of quality. You may see it by logging in. |