You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Manjula Peiris <ma...@wso2.com> on 2008/02/15 10:40:32 UTC

Modifications for mime_parser

Hi devs,

I have attached the new mime_parser code which I believe resolve the
https://issues.apache.org/jira/browse/AXIS2C-862.

But following modifications need to be done in order to use that logic.

1. Need to move axis2_http_chunked_stream.h and the implementation to
util. currently it is in src/core/transport/http/util.

2. Need to move axis2_callback_info structure definition to util.
Currently it is in axis2_http_transport_utils.h. In my code I temporary
defined it in axis2_http_chunked_stream.h. Need your feed back on this.

These modifications needed because inside mime_parser we need to check
whether the stream is chunked and whether final chunk is received. If we
are going to do this without above modifications axiom will need to
depend on engine which is unacceptable. So we need to move them to util.

Actually the new implementation is depended on allocating the whole
buffer at once. When the incoming stream is not chunked we can allocate
the buffer using the content-length.

when the stream is chunked we will read till we find 0 size chunk. After
that we concatenate all the buffers to a single one. please go through
the attached new_mime_parser.c file for more information.

The tricky point is the user can specify a initial buffer
size .(Actually in the modified code I have hard code it) If there is
more to read in the chunked case this size of buffers will be created on
demand. For a receiver who processes large attachments frequently can
specify a larger buffer for efficient memory usage. I am thinking of
specifying this buffer size as a parameter in axis2.xml.

Your comments are highly appreciable.

Thanks,
-Manjula.
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org