View Issue Details

IDProjectCategoryView StatusLast Update
0005343mantisbtbugtrackerpublic2005-04-18 10:40
Reporterruss Assigned Tothraxisp  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version1.0.0a1 
Summary0005343: File download does not use filename in Konqueror / download script should set disposition type
Description

The Konqueror web browser does not use the filename set by file_download.php. It appears the Content-Disposition header is incomplete.

Refer to RFC 1806 for more information on Content-Disposition header for internet messages ( http://www.faqs.org/rfcs/rfc1806.html ).

From RFC 1806:

In the extended BNF notation of [RFC 822], the Content-Disposition
header field is defined as follows:
disposition := "Content-Disposition" ":"
disposition-type
*(";" disposition-parm)

    disposition-type := "inline"
                      / "attachment"
                      / extension-token
                      ; values are not case-sensitive

    disposition-parm := filename-parm / parameter

    filename-parm := "filename" "=" value;

Adding the disposition type fixes the problem in Konqueror 3.4. I did not test other versions.

file_download.php

OLD:
header( 'Content-Disposition: filename=' . file_get_display_name( $v_filename ) );
NEW:
header( 'Content-Disposition: attachment; filename=' . file_get_display_name( $v_filename ) );

This is from an older version of mantis. I believe the line would be like the following in the newest version.

header( 'Content-Disposition: attachment; filename="' . file_get_display_name( $v_filename ) . '"' );

TagsNo tags attached.

Relationships

related to 0006679 closedthraxisp Attachment download always opens "Save As" dialog even when a .png 

Activities

thraxisp

thraxisp

2005-03-28 09:15

reporter   ~0009670

Fixed in CVS with 0004860.