httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Carmichael <lecar_...@yahoo.com>
Subject Re: A possible bug with get_line in v1.3
Date Fri, 06 Aug 2004 17:27:24 GMT
> > Also, would it be best for me to post the updated
> > 'get_line' function to the list for review or is
> there
> > a better way?
> 
> Sure, let's see it.  However apreq-1 really needs a
> new release
> manager to volunteer, because my personal focus now
> is on apreq-2.

Well I've tried one thing which is:
char* get_line([...]) {
[...]
   if (!ptr) {
      int tries = 0;
      int maxtries = 15; /* some number... */

      while (self->bytes_in_buffer < self->bufsize &&
             self->r->remaining > 0 &&
             tries <= maxtries ) {
             fill_buffer(self);
             ptr = next_line(self);
             if (ptr) 
                 break;
              tries++;
       }
    }

My other thought was that if the fill_buffer function
could be smarter about its reading. It could try some
number of times to read when its buffer was not full
and there were still data available. Much like the
update to get_line above. Neither is a great choice
since both require a manual try count just in case the
content length was off. 

Thoughts?

Thanks,

Lee


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

Mime
View raw message