|
From: Matthew G. <mat...@gm...> - 2006-03-20 19:50:55
|
I've committed this to CVS and will be releasing 1.8.1 with this included.
On 3/16/06, Aaron Axelsen <li...@fr...> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The problem appears to be that IE requires more header content. I
> have created a patch against the latest cvs and attached it to this email=
.
>
> Adding the following to the header solves the IE issues:
>
> header("Pragma: public");
> header("Expires: 0");
> header("Cache-Control: must-revalidate, post-check=3D0, pre-check=3D0");
> header("Cache-Control: private",false);
>
> - --
> Aaron Axelsen
> li...@fr...
>
> Great hosting, low prices. Modevia Web Services LLC --
> http://www.modevia.com
>
>
>
> Aaron Axelsen wrote:
> > I have tested this on all mac and pc browsers, the problem only
> > exists in the latest version of IE. I currently do not have the
> > means to test on older versions of IE.
> >
> > This leads me to believe Microsoft patched something that is
> > breaking this.
> >
> > -- Aaron Axelsen li...@fr...
> >
> > Great hosting, low prices. Modevia Web Services LLC --
> > http://www.modevia.com
> >
> >
> >
> > Aaron Axelsen wrote:
> >>> Whenever I try to export survey data in IE, i get an error
> >>> saying Internet Explorer cannot download the file from the
> >>> server.
> >>>
> >>> I am running version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
> >>>
> >>> Does anyone else have this problem with the latest updates on
> >>> windows xp? If you do not have this problem, what version of
> >>> IE running?
> >>>
> >>>
> >>> ------------------------------------------------------- This
> >>> SF.Net email is sponsored by xPML, a groundbreaking scripting
> >>> language that extends applications into web and mobile media.
> >>> Attend the live webcast and join the prime developer group
> >>> breaking into this new coding territory!
> >>>
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=
=3D121642
> >
> >>> _______________________________________________ phpESP-devel
> >>> mailing list php...@li...
> >>> https://lists.sourceforge.net/lists/listinfo/phpesp-devel
> >>>
> >
> > ------------------------------------------------------- This SF.Net
> > email is sponsored by xPML, a groundbreaking scripting language
> > that extends applications into web and mobile media. Attend the
> > live webcast and join the prime developer group breaking into this
> > new coding territory!
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=
=3D121642
> > _______________________________________________ phpESP-devel
> > mailing list php...@li...
> > https://lists.sourceforge.net/lists/listinfo/phpesp-devel
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEGbniuucONIvD0AMRAuaCAJ0ZL06x3sE7nyTDwQjO2MRPPazU1QCgm89O
> yPfBYaoh5kCoQ+GnapkClfM=3D
> =3DDa2m
> -----END PGP SIGNATURE-----
>
>
>
> --- admin/include/where/download.inc 2005-08-01 11:12:55.000000000-050=
0
> +++ ../../phpESP/admin/include/where/download.inc 2006-03-16 13:05:
> 20.000000000 -0600
> @@ -51,22 +51,33 @@
> }
> }
>
> + // default to csv_full_header
> $type =3D isset($_GET['type']) ? $_GET['type'] : 'csv_full_header=
';
>
> - // default to csv_full_header
> + // common headers
> + function printCommonHeaders() {
> + header("Pragma: public");
> + header("Expires: 0");
> + header("Cache-Control: must-revalidate, post-check=3D0,
> pre-check=3D0");
> + header("Cache-Control: private",false);
> + header("Content-Transfer-Encoding: ascii");
> + }
> +
> switch($type) {
> case 'spss':
> //NOT FULLY IMPLEMENT YET
> - header("Content-Transfer-Encoding: ascii");
> - header("Content-Disposition: attachment;
> filename=3D$name.por");
> - header("Content-Type: application/txt");
> + printCommonHeaders();
> + header("Content-Type: text/comma-separated-values");
> + header("Content-Disposition: attachment;
> filename=3D{$name}.csv");
> $output =3D survey_generate_results($type, $sid);
> - //Do something with output
> + foreach ($output as $row ) {
> + echo(implode(',', $row) . "\r\n");
> + }
> break;
>
> case 'xml':
> //NOT FULLY IMPLEMENT YET
> - header("Content-Transfer-Encoding: ascii");
> + printCommonHeaders();
> header("Content-Disposition: attachment;
> filename=3D$name.xml");
> header("Content-Type: text/xml");
> $output =3D survey_generate_results($type, $sid);
> @@ -75,7 +86,7 @@
>
> case 'tab':
> // TAB
> - header("Content-Transfer-Encoding: ascii");
> + printCommonHeaders();
> header("Content-Disposition: attachment;
> filename=3D$name.txt");
> header("Content-Type: text/tab-separated-values");
> $output =3D survey_generate_results($type, $sid);
> @@ -86,7 +97,7 @@
>
> default:
> // CSV, csv_full_header old method, csv_short_header new
> method
> - header("Content-Transfer-Encoding: ascii");
> + printCommonHeaders();
> header("Content-Disposition: attachment;
> filename=3D$name.csv");
> header("Content-Type: text/comma-separated-values");
> $output =3D survey_generate_results($type, $sid);
>
>
>
--
D'oh!
|