You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/01/13 10:25:21 UTC

DO NOT REPLY [Bug 18783] - recent change in ap_rgetline_core created an infinite loop

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=18783>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=18783





------- Additional Comments From berry@cs.vu.nl  2005-01-13 10:25 -------
Created an attachment (id=13995)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=13995&action=view)
Resolvement for rgetline issue

I recently also ran into this issue, and verified that it was indeed the
for(;;) loop which isn't broken out of in case off an EOS bucket when using
rgetline to read the contents of an entire request.

The attached patch resolves this issue, be kind and include it in next release.


As a temporary workaround in modules; I use the following sequence:
  for(...) {
    /* workaroun starts */
    apr_brigade_cleanup(bb);
    ap_get_brigade(r->input_filters, bb, AP_MODE_GETLINE, APR_BLOCK_READ, 0);
    if(APR_BUCKET_IS_EOS(APR_BRIGADE_FIRST(bb)))
      break;
    /* end of workaround */
    ap_rgetline_core(&line, 1024, &len, req, 0, bb);
    ...
  }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org