pike.git / src / modules / _Roxen / roxen.c

version» Context lines:

pike.git/src/modules/_Roxen/roxen.c:208:       /* Parse headers. */    for(i = 0; i < l; i++)    {    if(!keep_case && (in[i] > 64 && in[i] < 91))    {    in[i]+=32; /* lower_case */    }    else if( in[i] == ':' )    { -  /* FIXME: Does not support white space before the colon. */ +  /* Does not support white space before the colon. This is in +  line with RFC 7230 product +  header-field = field-name ":" OWS field-value OWS */    /* in[os..i-1] == the header */    int val_cnt = 0;    push_string(make_shared_binary_string((char*)in+os,i-os));       /* Skip the colon and initial white space. */    os = i+1;    while((in[os]==' ') || (in[os]=='\t')) os++;       /* NOTE: We need to support MIME header continuation lines    * (Opera uses this...).    */    do {    for(j=os;j<l;j++) /* Find end of line */    if( in[j] == '\n' || in[j]=='\r')    break;    -  +  /* FIXME: Remove header value trailing spaces. */    push_string(make_shared_binary_string((char*)in+os,j-os));    val_cnt++;       if((in[j] == '\r') && (in[j+1] == '\n')) j++;    os = j+1;    i = j;    /* Check for continuation line. */    } while ((os < l) && ((in[os] == ' ') || (in[os] == '\t')));       if (val_cnt > 1) {