Response headers for downloaded files

Author Message

Marco Rogers

Friday 06 August 2010 1:50:39 pm

I can get files downloaded through the content/download module just fine. But with things like pdfs, I'm always prompted to download even if I have the browser pdf plugin. This seems to be due to the fact that the Content-Disposition header is set on the response.

HTTP/1.1 200 OK
Date: Fri, 06 Aug 2010 16:34:12 GMT
Server: Apache/2.2.3 (Red Hat)
X-Powered-By: eZ Publish
Set-Cookie: ...
Expires: Fri, 06 Aug 2010 16:44:12 GMT
Cache-Control:
Pragma:
Last-Modified: Mon, 26 Jul 2010 14:08:43 GMT
Served-by: ...
Content-language: en-US
Content-Length: 105542
Content-disposition: attachment; filename="phpY8nrQk"
Content-Transfer-Encoding: binary
Accept-Ranges: bytes
Content-Type: application/octet-stream

What's the best way to disable this entirely? I want to remove that header. Any help is appreciated.

I have confirmed that the headers aren't set by the content module itself. I'm just not sure what happens after that which sets these headers.

Heath

Tuesday 10 August 2010 8:24:36 pm

Hello Marco,

I recently read a similar forum thread topic.

I think this should help you find the answer.

http://share.ez.no/forums/developer/link-directly-to-a-pdf-to-make-it-open-in-the-browser

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 03:00:02
Script start
Timing: Jan 18 2025 03:00:02
Module start 'layout'
Timing: Jan 18 2025 03:00:02
Module start 'content'
Timing: Jan 18 2025 03:00:03
Module end 'content'
Timing: Jan 18 2025 03:00:03
Script end

Main resources:

Total runtime0.7927 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.9297152.6250
Module start 'layout' 0.00810.0443 740.554739.4453
Module start 'content' 0.05240.7387 780.0000525.6953
Module end 'content' 0.79110.0016 1,305.69538.1563
Script end 0.7927  1,313.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.04135.2045160.0026
Check MTime0.02963.7312160.0018
Mysql Total
Database connection0.00290.365710.0029
Mysqli_queries0.688886.8935550.0125
Looping result0.00110.1438530.0000
Template Total0.691987.320.3460
Template load0.00210.271020.0011
Template processing0.689887.012420.3449
Template load and register function0.00010.018210.0001
states
state_id_array0.00190.234310.0019
state_identifier_array0.00090.110420.0004
Override
Cache load0.00180.2266310.0001
Sytem overhead
Fetch class attribute can translate value0.00050.064420.0003
Fetch class attribute name0.00190.245130.0006
XML
Image XML parsing0.00070.086620.0003
class_abstraction
Instantiating content class attribute0.00000.001430.0000
General
dbfile0.00210.2586170.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs