Author |
Message
|
smdavies99 |
Posted: Wed Sep 16, 2015 9:25 am Post subject: HTTP Request and Character escaping |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
We are receiving an HTTP/Get from a client and in the Get there is a $ character that is not escaped to %24
For example
Code: |
http://127.0.0.1/9090:CASHACCNT?Till=34?Operator=12345?Amount=$AMOUNT$
|
{missing a few bits}
This type of message is received when an operator logs on to a checkout
When tryin to simulate the calls we get from another flow there does not seem to be a way to get the $ to be received in a non escaped format.
So:-
1) Is the unescaped $ legit?
No errors are thrown
2) If it is legit how can I code up an HTTP request to include the non escaped character.
So far I've not been able to find a way to do this. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 16, 2015 9:44 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Can you put it in unicode? <U+xxxx>
Can you double down on the $? $$
Can you use telnet to send the ugly request? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Sep 16, 2015 10:36 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqjeff wrote: |
Can you put it in unicode? <U+xxxx>
|
That is one option. Not tried it yet.
Quote: |
Can you double down on the $? $$
|
Not thought of that but won't that second $ just get escaped as well.
Quote: |
Can you use telnet to send the ugly request? |
we have to make some major enhancements to the existing flow and I was trying to create a test harness to enable automated testing of all the failure conditons. Something like
MQInput-->HttpRequest-->MQOutput
Putting a sample string into the URL bar of a web browser (with the $) works but is hardly conducive to automated testing
The existing flow is quite old and frankly was not developed according to current standards. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
stoney |
Posted: Wed Sep 16, 2015 11:46 pm Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
How are you passing the URL to the HTTPRequest node? Using the property on the node, or via LocalEnvironment override? |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Sep 17, 2015 12:31 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
stoney wrote: |
How are you passing the URL to the HTTPRequest node? Using the property on the node, or via LocalEnvironment override? |
via the local environment _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
stoney |
Posted: Thu Sep 17, 2015 12:44 am Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
Are you running on a level that has APAR IT00798 in (8.0.0.5/9.0.0.3/10.0.0.1)?
http://www-01.ibm.com/support/docview.wss?uid=swg1IT00798
That APAR seems to have caused issues for a few customers, so we've issued APAR PI45626 (not closed yet, so no link available).
PI45626 ensures that the reserved characters defined by RFC3986 (:/?#[]@!$&'()*+,;=) don't get automatically percent encoded.
You might want to open a PMR and ask for a fix? |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Sep 17, 2015 3:12 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
stoney wrote: |
Are you running on a level that has APAR IT00798 in (8.0.0.5/9.0.0.3/10.0.0.1)?
http://www-01.ibm.com/support/docview.wss?uid=swg1IT00798
That APAR seems to have caused issues for a few customers, so we've issued APAR PI45626 (not closed yet, so no link available).
PI45626 ensures that the reserved characters defined by RFC3986 (:/?#[]@!$&'()*+,;=) don't get automatically percent encoded.
You might want to open a PMR and ask for a fix? |
I am running this on 10.0.0.1 and 9.0.0.3.
There is no rush for me because I've added some ESQL in the reciever flow to replace the %24 with a $. As I said when I opened the post, it was for testing only.We get the unescaped $ from the real applications. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|