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

version» Context lines:

pike.git/src/modules/_Roxen/roxen.c:207:    if( Pike_sp[-1].type != PIKE_T_MAPPING )    Pike_error("Wrong argument type to make_http_headers(mapping heads)\n");       m = Pike_sp[-1].u.mapping;    /* loop to check len */    NEW_MAPPING_LOOP( m->data )    {    if( k->ind.type != PIKE_T_STRING || k->ind.u.string->size_shift )    Pike_error("Wrong argument type to make_http_headers("    "mapping(string(8bit):string(8bit)|array(string(8bit))) heads)\n"); -  if( k->val.type == PIKE_T_STRING ) +  if( k->val.type == PIKE_T_STRING && !k->val.u.string->size_shift )    total_len += k->val.u.string->len + 2 + k->ind.u.string->len + 2;    else if( k->val.type == PIKE_T_ARRAY )    {    struct array *a = k->val.u.array;    ptrdiff_t i, kl = k->ind.u.string->len + 2 ;    for( i = 0; i<a->size; i++ )    if( a->item[i].type != PIKE_T_STRING||a->item[i].u.string->size_shift )    Pike_error("Wrong argument type to make_http_headers("    "mapping(string(8bit):string(8bit)|"    "array(string(8bit))) heads)\n");