Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

apreq_parser_run() returns APR_EOF with large uploads

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


request4spam at gmail

Nov 18, 2009, 11:48 AM

Post #1 of 2 (349 views)
Permalink
apreq_parser_run() returns APR_EOF with large uploads

Forgive me (and direct me, please) if this is not the best list for such a
question -- I searched the list information & this is the best I could come
up with.

I'm using libapreq2 to process in-the-stream POSTs in order to detect
uploads. Long story short is that I get APR_EOF returned from
apreq_parser_run() when uploads/attachments are fairly large (>200k or so;
The process works correctly otherwise). Due to this, apr_table_do() does not
return information about the actual upload.

Here is my code:

apr_table_t* pPostBody = apr_table_make(m_pAprPool,
APREQ_DEFAULT_NELTS);
apr_bucket_alloc_t* pBucket = apr_bucket_alloc_create(m_pAprPool);
apr_bucket_brigade* pBrigade = apr_brigade_create(m_pAprPool, pBucket);

apreq_parser_t* pParser = apreq_parser_make(
m_pAprPool,
pBucket,
contentTypeBuf.data(),
pfnParserFunc,
APREQ_DEFAULT_BRIGADE_LIMIT,
"C:\\Users\\joeuser\\AppData\\Local\\Temp", // :TODO: FET
NULL,
NULL);

// The entire post data (e.g. HTTP body) is in pData with uiDataLen length
APR_BRIGADE_INSERT_HEAD(pBrigade,
apr_bucket_immortal_create(pData, uiDataLen,
pBrigade->bucket_alloc));
APR_BRIGADE_INSERT_TAIL(pBrigade,
apr_bucket_eos_create(pBrigade->bucket_alloc));

apr_status_t rv = apreq_parser_run(pParser, pPostBody, pBrigade); // rv will
be APR_EOF here with ~ >= 200k attachments

apr_table_do(AprPostBodyIterCallback, &iterCbData, pPostBody, NULL); //
AprPostBodyIterCallback only gets hit for a couple keys; no upload
params/etc.

What am I doing wrong?! Please help!

Thanks,

Bryan


raliste at gmail

Nov 18, 2009, 11:56 AM

Post #2 of 2 (326 views)
Permalink
Re: apreq_parser_run() returns APR_EOF with large uploads [In reply to]

You are in the right list, unfortunately I cannot help you, but I'm sure
someone will.

2009/11/18 request4spam <request4spam [at] gmail>

> Forgive me (and direct me, please) if this is not the best list for such a
> question -- I searched the list information & this is the best I could come
> up with.
>
> I'm using libapreq2 to process in-the-stream POSTs in order to detect
> uploads. Long story short is that I get APR_EOF returned from
> apreq_parser_run() when uploads/attachments are fairly large (>200k or so;
> The process works correctly otherwise). Due to this, apr_table_do() does not
> return information about the actual upload.
>
> Here is my code:
>
> apr_table_t* pPostBody = apr_table_make(m_pAprPool,
> APREQ_DEFAULT_NELTS);
> apr_bucket_alloc_t* pBucket = apr_bucket_alloc_create(m_pAprPool);
> apr_bucket_brigade* pBrigade = apr_brigade_create(m_pAprPool, pBucket);
>
> apreq_parser_t* pParser = apreq_parser_make(
> m_pAprPool,
> pBucket,
> contentTypeBuf.data(),
> pfnParserFunc,
> APREQ_DEFAULT_BRIGADE_LIMIT,
> "C:\\Users\\joeuser\\AppData\\Local\\Temp", // :TODO: FET
> NULL,
> NULL);
>
> // The entire post data (e.g. HTTP body) is in pData with uiDataLen length
> APR_BRIGADE_INSERT_HEAD(pBrigade,
> apr_bucket_immortal_create(pData, uiDataLen,
> pBrigade->bucket_alloc));
> APR_BRIGADE_INSERT_TAIL(pBrigade,
> apr_bucket_eos_create(pBrigade->bucket_alloc));
>
> apr_status_t rv = apreq_parser_run(pParser, pPostBody, pBrigade); // rv
> will be APR_EOF here with ~ >= 200k attachments
>
> apr_table_do(AprPostBodyIterCallback, &iterCbData, pPostBody, NULL); //
> AprPostBodyIterCallback only gets hit for a couple keys; no upload
> params/etc.
>
> What am I doing wrong?! Please help!
>
> Thanks,
>
> Bryan
>



--
Rodrigo Aliste P.

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.