Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
Peter is currently offline  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?
 
Read Message
Read Message
Previous Topic: Some additions to Skylark
Next Topic: Need a working simple example of using sockets with GUI in U++
Goto Forum:
  


Current Time: Sat Jun 08 15:07:01 CEST 2024

Total time taken to generate the page: 0.01402 seconds