HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsLinksLinksProblem with inconsistent Content-TypeProblem with inconsistent Content-Type
Previous
 
Next
New Post
3/11/2010 10:34 PM
 

Hi Experts

I have a problem with the .DOCX Mime Content type we use. I have correctly set the MIME type on my IIS server (V6) as

".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document

When I retrieve a test document form the site using a direct link, eg

http://mydnnsite.com/portals/0/test.docx

the HTTP header is:

HTTP/1.1·200·OK(CR)(LF)
Content-Length:·9977(CR)(LF)
Content-Type:·application/vnd.openxmlformats-officedocument.wordprocessingml.document(CR)(LF)
Last-Modified:·Fri,·12·Mar·2010·02:37:35·GMT(CR)(LF)
Accept-Ranges:·bytes(CR)(LF)
ETag:·"a5715ef98cc1ca1:ed2"(CR)(LF)
Server:·Microsoft-IIS/6.0(CR)(LF)
X-Powered-By:·ASP.NET(CR)(LF)
Date:·Fri,·12·Mar·2010·02:51:30·GMT(CR)(LF)
Connection:·close(CR)(LF)

 When I then use the link module and reference this as a File Link the URL

http://mydnnsite.com/LinkClick.aspx?fileticket=gln6elZuXys%3d&tabid=97&mid=2045

shows the HTTP header as

HTTP/1.1·200·OK(CR)(LF)
Connection:·close(CR)(LF)
Date:·Fri,·12·Mar·2010·03:22:56·GMT(CR)(LF)
Server:·Microsoft-IIS/6.0(CR)(LF)
X-Powered-By:·ASP.NET(CR)(LF)
X-AspNet-Version:·2.0.50727(CR)(LF)
content-disposition:·inline;·filename="Test.docx"(CR)(LF)
Content-Length:·9977(CR)(LF)
Cache-Control:·private(CR)(LF)
Content-Type:·application/octet-stream(CR)(LF)
(CR)(LF)

Note the different Content-Types.

The problem truly manifests in IE7: In the first case IE opens the file in word, but in the second case it regards it as a .ZIP file (which it is) and wants to save it as a .zip file, rather than opening in Word. Firefox 3.6 does not show this behaviour.

My client is not happy and wants this resolved. I am thinking that DNN mangles the content type that IIS would normally show when it writes the headers.

I am crossposting this to the Links and Filemanager module forums. Any feed back much appreciated!

Regards

Felix Burkhard

 

 
New Post
3/12/2010 9:08 AM
 

While working on a Silverlight image editing and uploadcontrol the other night I noticed similar behavior with png files.

When adding a file to the Files table or when streaming content to the browser, DotNetNuke determines the content type based on the filename extension using a call to the shared method DotNetNuke.Common.Utilities.FileSystemUtils.GetContentType. Unfortunately, the method has not been updated to handle any of the newer filename extensions and content types. All others default to "application/octet-stream".

I will add the issue to the Gemini support system.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer.
Coming Soon: By Invitation and FRBO-For Rent By Owner
 
New Post
4/26/2010 5:14 PM
 

 We just noticed this today (we don't usually upload .docx files). Any update on this issue?

 
New Post
4/26/2010 8:00 PM
 

The issue number in Gemini is DNN-11895.

While it has been verified it is not yet on the roadmap for the next release DNN 5.4.2.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer.
Coming Soon: By Invitation and FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsLinksLinksProblem with inconsistent Content-TypeProblem with inconsistent Content-Type


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.