[MAGNOLIA-3684] removing the value in defaultExtension results in responses without proper content-type header Created: 10/May/11  Updated: 16/Jan/12  Resolved: 13/Jan/12

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 4.4.2
Fix Version/s: 4.4.6, 4.5

Type: Bug Priority: Neutral
Reporter: Tomas Brimor Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File ContentTypeFilter.java    
Issue Links:
Cloners
is cloned by MAGNOLIA-3945 Improve MAGNOLIA-3684 - should check ... Closed
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Request URL: ***
Request Method:GET
Status Code:200 OK

Request Headers
----------------------------------------------------------------------
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-GB,en-US;q=0.8,en;q=0.6,sv;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Cookie:JSESSIONID=D23BB92C0AB920888071AE1CC44E6B88.mgnl-2
Host:***
Pragma:no-cache
Referer:***
User-Agent:Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16

Response Headers
----------------------------------------------------------------------
Connection:Keep-Alive
Content-Type:;charset=UTF-8
Date:Tue, 10 May 2011 13:04:00 GMT
Keep-Alive:timeout=5, max=98
Server:Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/1.0.0d mod_jk/1.2.31
Transfer-Encoding:chunked
X-Magnolia-Registration:Registered
X-Powered-By:Servlet 2.4; JBoss-4.3.0.GA_CP06 (build: SVNTag=JBPAPP_4_3_0_GA_CP06 date=200907141446)/JBossWeb-2.0



 Comments   
Comment by Zdenek Skodik [ 16/Nov/11 ]

The attached class fixes the issue.

Comment by Zdenek Skodik [ 10/Jan/12 ]

Please add && StringUtils.isEmpty(extension) to the condition as well.

Comment by Jan Haderka [ 13/Jan/12 ]

I'm not convinced. Wouldn't it be safer to check whether resolved mime type is not empty rather then whether default and current extensions are both empty?

Comment by Zdenek Skodik [ 13/Jan/12 ]

It's doable indeed, if we want to force text/html for mime types not yet registered in Magnolia.

Comment by Ondrej Chytil [ 13/Jan/12 ]

In 4.5 should be resolved by mime types - MAGNOLIA-3945.

Generated at Mon Feb 12 03:48:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.