Branch: Tag:

2002-10-30

2002-10-30 17:20:17 by Jonas Wallden <jonasw@roxen.com>

Apply output encoding to wide strings regardless of content type. This
should solve a CMS problem where the content type is forced to a unregistered
value in order to avoid browsers peeking at the data.

Rev: server/protocols/http.pike:1.381

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.380 2002/10/25 18:19:40 mast Exp $"; + constant cvs_version = "$Id: http.pike,v 1.381 2002/10/30 17:20:17 jonasw Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1637:       if( stringp(file->data) )    { -  if (file["type"][0..4] == "text/") +  if ((file["type"][0..4] == "text/") || +  (String.width(file->data) > 8))    {    [charset,file->data] = output_encode( file->data, 1 );    if( charset && (search(file["type"], "; charset=") == -1))