>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




General

Author Thread: POST argument parsing
davin.church
POST argument parsing
Posted: Thursday, July 08, 2004 12:26 AM (EST)

When WS accepts POST arguments, they come in from the browser in URL-encoded form.  WS decodes this and passes a 2-column decoded matrix to APL.  However, it doesn't seem to be doing a very complete job of decoding.

 

There are a number of special characters that must be URL-encoded when passing them as data (and a few others are recommended).  Regular alphanumerics and a few other characters may be passed directly without encoding.  However, it is permitted to hex-encode (%HH) any data characters, even if they are not required to be encoded.

 

From the looks of things, WS only decodes the required-to-be-encoded characters.  If other characters (like "-") are passed in hex form, they are not decoded in the APL array.  This isn't usually needed, but it's technically invalid and such encodings should always be decoded.

 

I ran into this tonight because I was doing my own encoding and was erring on the side of caution because I wasn't sure what was required and what wasn't.  Therefore, I'd like to:

 

(a) request that all hex-encoded characters be decoded by the time they're passed to APL, and

 

(b) until that time, can you provide me a list of characters that you're currently decoding so I'll know what to encode and what not to?


Comments:

Author Thread:
fred.waid
POST argument parsing
Posted: Thursday, July 08, 2004 8:53 AM (EST)

Ok, I just looked at the code and we are definitely decoding all of the hex characters.  Did you forget to use the leading % for the hex encoding.

 

I checked the rfc 1738 at http://www.w3.org/Addressing/rfc1738.txt

 

Could you post a sample of the encoded string you sent which was not decoded?

     

davin.church
POST argument parsing
Posted: Thursday, July 08, 2004 12:58 PM (EST)

Ok - I just re-ran the same code that was giving me trouble yesterday and it won't fail today!  What have you done to my code??  No fair sneaking in and fixing my computer behind my back!

 

<sigh>  Nevermind...

 

<hangs head & shuffles out of the room>

     



APL2000 Official Web Site

The true "final frontier" is in the minds and the will of people.
-- Gen. Michael E. Ryan, U.S. Air Force Chief of Staff

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |