Home » U++ Library support » U++ MT-multithreading and servers » url-encoded binary data in URL query string - how to decode properly?
url-encoded binary data in URL query string - how to decode properly? [message #40414] |
Wed, 31 July 2013 09:55  |
Peter
Messages: 16 Registered: October 2012
|
Promising Member |
|
|
Hi.
I'm facing the following problem. Suppose I have a binary file which I want to send via a http GET request in a URL. Before transfer, the raw data must be Base64 encoded.
Suppose I have the following url:
http://myhost.com/path/?data=...
Where ?data=... is the URL query string with Base64 encoded binary data after "=" character.
Now suppose I have a Skylark handler for "/path". Binary data (still Base64 encoded) can be accessed on server side by http["data"].ToString(), but there's a problem. The resulting string is not the same as the original one: all "+" characters from original string become " " (space) characters. I know this is due to the fact that spaces in url query strings are encoded by plus characters, but what about two other potentially "dangerous" characters, particularly "/" and "=" (padding indicator) appearing in Base64 encoded strings? Will they be substituted either?
|
|
|
|
Goto Forum:
Current Time: Sat May 10 00:33:26 CEST 2025
Total time taken to generate the page: 0.00699 seconds
|