Branch: Tag:

2000-02-14

2000-02-14 10:22:01 by Per Hedbor <ph@opera.com>

Calculate the content-length _after_ the encoding, also, do not default to utf-8 for pages with only iso-8859-1. :-)

Rev: server/protocols/http.pike:1.204

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2000, Idonex AB.    - constant cvs_version = "$Id: http.pike,v 1.203 2000/02/14 10:19:09 per Exp $"; + constant cvs_version = "$Id: http.pike,v 1.204 2000/02/14 10:22:01 per Exp $";      #define MAGIC_ERROR   
145:    }    else    { -  if( String.width( what ) > 1 ) +  if( String.width( what ) > 8 )    {    charset = "UTF-8";    what = string_to_utf8( what );
1526:    }    }    } -  if(stringp(file->data)) -  file->len += strlen(file->data); +     }    if(prot != "HTTP/0.9") {    string h, charset;
1539:    charset = "; charset="+charset;    else    charset=""; +  if(stringp(file->data)) +  file->len += strlen(file->data);    }       heads |= ([