Show
Ignore:
Timestamp:
08/17/08 19:08:27 (3 months ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/cherokee/buffer.c

    r1710 r1852  
    15971597 
    15981598 
     1599ret_t 
     1600cherokee_buffer_convert_to_chunked (cherokee_buffer_t *buf) 
     1601{ 
     1602        int  len; 
     1603        char tmp[40]; 
     1604 
     1605        len = sprintf (tmp, "%x", buf->len); 
     1606        if (unlikely (len > 40-3)) 
     1607                return ret_error; 
     1608 
     1609        tmp[len]   = CHR_CR; 
     1610        tmp[len+1] = CHR_LF; 
     1611        tmp[len+2] = '\0'; 
     1612 
     1613        cherokee_buffer_ensure_size (buf, buf->len + len + 2); 
     1614        cherokee_buffer_prepend (buf, tmp, len+2); 
     1615        cherokee_buffer_add_str (buf, CRLF); 
     1616 
     1617        return ret_ok; 
     1618} 
     1619 
     1620 
    15991621ret_t  
    16001622cherokee_buffer_add_chunked (cherokee_buffer_t *buf, char *txt, size_t size)