weird http header problem with rlib_get_content_length
michiel <[email protected]> Sat, 23 Jun 2007 15:35:45 +0200
| Newsgroups | gmane.text.rlib.user |
|---|---|
| Message-ID | <[email protected]> |
It looks like the php header function does not like the newline between Content-Type and Content-Length in PHP 5.16 if I do: header(rlib_get_content_type($rlib), true); rlib_spool($rlib); rlib_free($rlib); The header does not set correctly and PDF's are displayed as text in the browser However: $hh = rlib_get_content_type($rlib); $cl = strpos($hh, 'Content-Length'); $ctype_string = substr($hh,0,$cl); $clength_string = substr($hh, $cl); header(trim($ctype_string), true); header(trim($clength_string)); rlib_spool($rlib); rlib_free($rlib); It works fine! ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/