Changeset 6761
- Timestamp:
- 12/27/07 16:44:47 (10 months ago)
- Files:
-
- branches/1.0/lib/response/sfWebResponse.class.php (modified) (1 diff)
- branches/1.0/test/unit/response/sfWebResponseTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/response/sfWebResponse.class.php
r6744 r6761 236 236 { 237 237 // add charset if needed 238 if (false === stripos($value, 'charset') )238 if (false === stripos($value, 'charset') && 0 === stripos($value, 'text/')) 239 239 { 240 240 $value .= '; charset='.sfConfig::get('sf_charset'); branches/1.0/test/unit/response/sfWebResponseTest.php
r2884 r6761 12 12 require_once($_test_dir.'/unit/sfContextMock.class.php'); 13 13 14 $t = new lime_test(6 3, new lime_output_color());14 $t = new lime_test(64, new lime_output_color()); 15 15 16 16 class myWebResponse extends sfWebResponse … … 112 112 $t->is($response->getContentType(), 'text/xml;charset = ISO-8859-1', '->setContentType() does nothing if a charset is given'); 113 113 114 $response->setContentType('image/jpg'); 115 $t->is($response->getContentType(), 'image/jpg', '->setContentType() does not add a charset if the content-type is not text/*'); 116 114 117 $t->is($response->getContentType(), $response->getHttpHeader('content-type'), '->getContentType() is an alias for ->getHttpHeader(\'content-type\')'); 115 118