[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Allocation error in HTTPAPI



   Hello all,


   Occasionally I get an allocation error while parsing a xml-document. I
   believe it occurs when a large request (document) is being parsed.

   I read in the documentation that there is a TERASPACE compile option
   when generating HTTPAPI, but that is disabled for compatibility
   reasons in EXPAT. I am not sure this compile option will solve my
   problem though. I am running version 1.23 of HTTPAPI.


   Here is a snippit of my code:

   ...

   len = ContLen();

   UsrSpcNam = crtusrspc( UsrSpcLib : p2Space : qusei : '*ALL' : '' : le

   UsrSpcReq = UsrSpc;


   readIn( Workarea : len : inLen : Qusec );


   InvalidRequest = *On;

   // parse xml

   http_XmlReturnPtr(*ON);

   if (http_parse_xml_string( p2Space : inLen

                          : 0

                          : *NULL

                          : %paddr(EndTag)

                          : *null ) < 0 );

      MessageReturn  = http_error();

      InvalidRequest = *Off;

   endif;

   ...


   From the dump I generated after the MSGW in XALLOC it shows that my
   ContLen() = 4.213.172. I read the entire request into a *USRSPC and I
   pass the pointer to the userspace and the length to
   http_parse_xml_string.


   I use this method to send a flat file from one as/400 to another
   as/400 (excuse the old name). The file/data is base64 encoded and
   between two xml-tags. So the entire file is one XML-element. Probably
   this was a large file.


   Any hints on solving this problem...



   Rick Bovet

   Development Manager

   Siriusdreef 66, 2132 WT  Hoofddorp

   Postbus 3005, 2130 KA  Hoofddorp

   The Netherlands

   [1]rbovet@xxxxxxxxxxxxxxxx


   [2]ECi-Software Solutions-sm_signature 

References

   1. file://localhost/tmp/rbovet@xxxxxxxxxxxxxxxx
   2. http://www.ecisolutions.com/

JPEG image

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------