Here is a problem with using @URLDecode in an LS agent. If the string is to long Domino won't handle it. Post a 100K of encoded XML to an agent. Then concat the resulting reqest_content_00.. fields into a single string then try to evaluate. Doesn't work. Next try using an LS based Decode function. Carefull it may crash your server. Why would someone need to accept this much data. Receive encoded xml containing Base64 encoded attachments silly. Looks like Java may be the only option for something like this. Of course it could be a memory problem with the decode function itself
Here is a problem with using @URLDecode in an LS agent. If the string is to long Domino won't handle it. Post a 100K of encoded XML to an agent. Then concat the resulting reqest_content_00.. fields into a single string then try to evaluate. Doesn't work. Next try using an LS based Decode function. Carefull it may crash your server. Why would someone need to accept this much data. Receive encoded xml containing Base64 encoded attachments silly. Looks like Java may be the only option for something like this. Of course it could be a memory problem with the decode function itself
Function DecodeContent( s As String ) As String
On Error Goto errHandler
Dim r1 As String, r2 As String
Dim p_start As Long, p_found As Long
r1 = ""
p_start = 1
p_found = Instr( p_start, s, "+", 0 )
Do While p_found > 0
r1 = r1 + Mid$( s, p_start, p_found - p_start )
r1 = r1 + " "
p_start = p_found + 1
p_found = Instr( p_start, s, "+", 0 )
Loop
r1 = r1 + Mid$( s, p_start )
p_start = 1
p_found = Instr( p_start, r1, "%", 0 )
Do While p_found > 0
r2 = r2 + Mid$( r1, p_start, p_found - p_start )
r2 = r2 + Chr$( Val( "&H" + Mid$( r1, p_found + 1, 2 )))
p_start = p_found + 3
p_found = Instr( p_start, r1, "%", 0 )
Loop
r2 = r2 + Mid$( r1, p_start )
DecodeContent = r2
varCleanup:
Exit Function
errHandler:
Msgbox "Decode error" & Error$ & " at line " & Erl & "Cur p_start:" & p_start
Resume varCleanup
End Function