apreq_parser_run() returns APR_EOF with large uploads

apreq_parser_run() returns APR_EOF with large uploads

am 18.11.2009 20:48:35 von request4spam

--001636025ea83ee50c0478aa87a6
Content-Type: text/plain; charset=ISO-8859-1

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

--001636025ea83ee50c0478aa87a6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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 returne=
d from apreq_parser_run() when uploads/attachments are fairly large (>20=
0k 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  =A0   =A0 =A0=
   =3D apr_table_make(m_pAprPool, APREQ_DEFAULT_NELTS);
apr_bucket_a=
lloc_t* pBucket  =A0   =A0 =3D apr_bucket_alloc_create(m_pAprPool);=

apr_bucket_brigade* pBrigade  =A0 =3D apr_brigade_create(m_pAprPool=
, pBucket);


apreq_parser_t* pParser  =A0   =A0   =A0 =3D apreq_parser_m=
ake(
  =A0   =A0 m_pAprPool,
  =A0   =A0 pBucket, r>  =A0   =A0 contentTypeBuf.data(),
  =A0   =A0 pfnPars=
erFunc,
  =A0   =A0 APREQ_DEFAULT_BRIGADE_LIMIT,
  =A0 =
  =A0 "C:\\Users\\joeuser\\AppData\\Local\\Temp",  =A0 //=
  =A0 :TODO: FET

  =A0   =A0 NULL,
  =A0   =A0 NULL);

//=A0 The e=
ntire post data (e.g. HTTP body) is in pData with uiDataLen length
APR_B=
RIGADE_INSERT_HEAD(pBrigade,
  =A0   =A0 apr_bucket_immortal_cre=
ate(pData, uiDataLen, pBrigade->bucket_alloc));

  =A0 APR_BRIGADE_INSERT_TAIL(pBrigade, apr_bucket_eos_create(pBrigade-=
>bucket_alloc));

apr_status_t rv =3D apreq_parser_run(pParser, pP=
ostBody, pBrigade); // rv will be APR_EOF here with ~ >=3D 200k attachme=
nts


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

What am I doing wrong?! Please help!

Thanks,


Bryan


--001636025ea83ee50c0478aa87a6--

Re: apreq_parser_run() returns APR_EOF with large

am 18.11.2009 20:56:54 von raliste

--00c09f83a7922747490478aaa602
Content-Type: text/plain; charset=ISO-8859-1

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

2009/11/18 request4spam

> 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.

--00c09f83a7922747490478aaa602
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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

2009/11/18 request4spam <=
span dir=3D"ltr"><request4spam=
@gmail.com
>


204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Forgive me (and d=
irect me, please) if this is not the best list for such a question -- I sea=
rched 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 dete=
ct uploads. Long story short is that I get APR_EOF returned from apreq_pars=
er_run() when uploads/attachments are fairly large (>200k or so; The pro=
cess works correctly otherwise). Due to this, apr_table_do() does not retur=
n information about the actual upload.




Here is my code:

apr_table_t* pPostBody  =A0   =A0 =A0=
   =3D apr_table_make(m_pAprPool, APREQ_DEFAULT_NELTS);
apr_bucket_a=
lloc_t* pBucket  =A0   =A0 =3D apr_bucket_alloc_create(m_pAprPool);=

apr_bucket_brigade* pBrigade  =A0 =3D apr_brigade_create(m_pAprPool=
, pBucket);




apreq_parser_t* pParser  =A0   =A0   =A0 =3D apreq_parser_m=
ake(
  =A0   =A0 m_pAprPool,
  =A0   =A0 pBucket, r>  =A0   =A0 contentTypeBuf.data(),
  =A0   =A0 pfnPars=
erFunc,
  =A0   =A0 APREQ_DEFAULT_BRIGADE_LIMIT,
  =A0 =
  =A0 "C:\\Users\\joeuser\\AppData\\Local\\Temp",  =A0 //=
  =A0 :TODO: FET



  =A0   =A0 NULL,
  =A0   =A0 NULL);

//=A0 The e=
ntire post data (e.g. HTTP body) is in pData with uiDataLen length
APR_B=
RIGADE_INSERT_HEAD(pBrigade,
  =A0   =A0 apr_bucket_immortal_cre=
ate(pData, uiDataLen, pBrigade->bucket_alloc));



  =A0 APR_BRIGADE_INSERT_TAIL(pBrigade, apr_bucket_eos_create(pBrigade-=
>bucket_alloc));

apr_status_t rv =3D apreq_parser_run(pParser, pP=
ostBody, pBrigade); // rv will be APR_EOF here with ~ >=3D 200k attachme=
nts




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

What am I doing wrong?! Please help!

Thanks,




Bryan




--
Rodrigo Aliste P.
r>

--00c09f83a7922747490478aaa602--