You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by request4spam <re...@gmail.com> on 2009/11/18 20:48:35 UTC
[users@httpd] 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
Re: [users@httpd] apreq_parser_run() returns APR_EOF with large
uploads
Posted by "Rodrigo Aliste P." <ra...@gmail.com>.
You are in the right list, unfortunately I cannot help you, but I'm sure
someone will.
2009/11/18 request4spam <re...@gmail.com>
> 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.