Can´t send + as POST-parameter

ostau

Member
Licensed User
Longtime User
In my simplified Webservice below the + will not transfered to the WebServer:

In Start_Service

Dim Parameters as String
Parameters = "Test=OK/+"

Dim bParameters() As Byte
bParameters = conv.StringToBytes(Parameters,"UTF-8")


Dim in As InputStream
in.InitializeFromBytesArray(bParameters, 0, bParameters.Length)
request.InitializePost("http://10.0.0.12/PMDSService/Service.asmx/CheckParameter",in,bParameters.Length)
request.SetContentEncoding("UTF-8")

....


The result on the WebServer is "OK/ "


I didn´t find any way to transfer the + sign (in the real project parameters is part of an base64 encoded bitmap of app. 500 kB).
I also tried to use InitializePost2 -> same result.
In my test website fromC# I get all characters correctly.


Kind regards, Oskar
 

ostau

Member
Licensed User
Longtime User
Thanks.
I tried URLSafe , which automatically should replace the special characters.
It didn´t work.
As I mentioned, the real string is around 500 kB (base64 encoded string of an byte array - a picture).
I think, it´s not a good idea to replace the + characters in such a big file considering memory and execution time.

Regards, Oskar
 
Upvote 0
Top