#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Apr_bucket_split() failed


    Hello,

    I am writing a module (output_filter) to modify the content of web pages. But I get error when using apr_bucket_split() function. The error message says "invalid argument", although I don't see anything wrong in parameters.

    stat = apr_bucket_split(e, pos);
    if (stat != APR_SUCCESS)
    {
    char errbuf[128];
    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "$>>>> Error message : %s ", apr_strerror(stat, errbuf, sizeof(errbuf)));
    }

    I verified that : 0 < 'pos' value < bucket length

    Any idea why does this error come?

    Any suggestion is appreciated.

    Thanks,
    eorsavik
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by eorsavik
    Hello,

    I am writing a module (output_filter) to modify the content of web pages. But I get error when using apr_bucket_split() function. The error message says "invalid argument", although I don't see anything wrong in parameters.

    stat = apr_bucket_split(e, pos);
    if (stat != APR_SUCCESS)
    {
    char errbuf[128];
    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "$>>>> Error message : %s ", apr_strerror(stat, errbuf, sizeof(errbuf)));
    }

    I verified that : 0 < 'pos' value < bucket length

    Any idea why does this error come?

    Any suggestion is appreciated.

    Thanks,
    eorsavik
    No. the problem was with pos value. The pos value was greater than bucket length and that's why the split function was failing.

IMN logo majestic logo threadwatch logo seochat tools logo