Ok not too sure about this, and yes the code needs refactoring, but if you post namevalue pairs to an agent for processing, loop through the request_content_xxx fields and append them to a stream... Streams don't seem to have the 64k limit, only fields, then process the stream as you would the field...
Ok not too sure about this, and yes the code needs refactoring, but if you post namevalue pairs to an agent for processing, loop through the request_content_xxx fields and append them to a stream... Streams don't seem to have the 64k limit, only fields, then process the stream as you would the field...
If Contextdoc.HasItem("REQUEST_CONTENT") Then
fieldname = "REQUEST_CONTENT"
NameValuePairs = Split(Contextdoc.GetItemValue( fieldname)(0),"&")
Forall nv In NameValuePairs
fieldname = Strleft(nv,"=")
fieldvalue = Strright(nv,"=")
Call stream.WriteText( "&" + fieldname +"="+ Trim(fieldvalue) , 5)
End Forall
Call contextdoc.RemoveItem(fieldname)
Else
For x = 0 To 9
If Contextdoc.HasItem("REQUEST_CONTENT_00"& x) Then
fieldname = "REQUEST_CONTENT_00"& x
NameValuePairs = Split(Contextdoc.GetItemValue( fieldname)(0),"&")
Forall nv In NameValuePairs
fieldname = Strleft(nv,"=")
fieldvalue = Strright(nv,"=")
Call stream.WriteText( "&" + fieldname +"="+ fieldvalue , 5)
End Forall
Call contextdoc.RemoveItem(fieldname)
End If
Next
End If
' Print "Bytes = " & stream.Bytes
stream.Position = 0
Do
buffer = Stream.ReadText(1)
' Print (buffer)
NameValuePairs = Split(buffer,"&")
Forall nv In NameValuePairs
fieldname = Strleft(nv,"=")
fieldvalue = Strright(nv,"=")
If fieldname <> "" Then
Savedoc.ReplaceItemValue fieldname, fieldvalue
Set item2 = savedoc.GetFirstItem( fieldname )
If item2.ValueLength > 900 Then item2.IsSummary = False
End If
End Forall
Loop Until Stream.IsEOS
...just a thought..