[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Bad MIMETYPE configuration for .htm files accessed via SVN HTTP

From: vishwanath ramachandran_at_honeywell.com <ramachandran_at_honeywell.com>
Date: Wed, 25 Nov 2009 18:49:08 +0530

Hi there

When accessing an .htm file stored in subversion, the server sends back
the content with the text/plain MIMETYPE. The browser is then showing
the .htm file as a plain/text file. If I open the same link in IE, it
will work as expected, but in Firefox. Actually, it is not a problem
with Firefox. The MIMETYPE that is sent by the HTTP server clearly
specifies to the browser that it should decode the sent content (the htm
file in this case) as a plain text, which Firefox does. IE apparently
overrides the HTTP MIMETYPEs with a mimetype contained in the file
itself. According to W3C HTTP standards, the HTTP requests mimetypes
shall always take precedence.

However, I expect that without this MIMETYPE specified in the request,
Firefox would then use the mimetype contained in the file to decide upon
how to decode it.

The problem comes from the SVN HTTP frontend: there should be a mapping
table in one of the frontend configuration files, that maps known file
extensions to appropriate mimetype such as *.jpg -> mimetype/image-jpeg.
Apparently, the *.htm and *.html entries are either missing, either put
as text/plain.

Here is the HTTP request and the HTTP answer:

Request

GET
http://acssvn.honeywell.com/ECC/HomesNA/SoftwareProcess/trunk/ECC%20Home
s%20SWDP.htm Load Flags
Request Headers:
      Host[acssvn.honeywell.com]
      User-Agent[Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)]
 
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[en-us,en;q=0.5]
      Accept-Encoding[gzip,deflate]
      Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]
      Keep-Alive[300]
      Connection[keep-alive]
      Cookie[FESESSIONID=1jf68mkaeg1e8;
crucibleprefs1="D%3D1258446975875%3Bhed%3DY%3Bhdf%3DY%3Bslp%3Dt%3Basv%3D
fe"
      If-Modified-Since[Wed, 24 Jun 2009 14:42:16 GMT]
      If-None-Match["188//trunk/ECC Homes SWDP.htm"]
      Cache-Control[max-age=0]

Response

Date[Tue, 17 Nov 2009 08:38:47 GMT]
      Server[Apache/2.0.52 (Red Hat)]
      Last-Modified[Wed, 24 Jun 2009 14:42:16 GMT]
      Etag["188//trunk/ECC Homes SWDP.htm"]
      Accept-Ranges[bytes]
      Content-Length[17362]
      Connection[close]
      Content-Type[text/plain; charset=UTF-8]

[ Show > <http://acsjira.honeywell.com:8085/browse/HELP-2433> ]

Fabrice Vergnenegre
<http://acsjira.honeywell.com:8085/secure/ViewProfile.jspa?name=e459323>
added a comment - 17/Nov/09 09:19 AM - edited Actually, it is not a
problem with Firefox. The MIMETYPE that is sent by the HTTP server
clearly specifies to the browser that it should decode the sent content
(the htm file in this case) as a plain text, which Firefox does. IE
apparently overrides the HTTP MIMETYPEs with a mimetype contained in the
file itself. According to W3C HTTP standards, the HTTP requests
mimetypes shall always take precedence. However, I expect that without
this MIMETYPE specified in the request, Firefox would then use the
mimetype contained in the file to decide upon how to decode it. The
problem comes from the SVN HTTP frontend: there should be a mapping
table in one of the frontend configuration files, that maps known file
extensions to appropriate mimetype such as *.jpg -> mimetype/image-jpeg.
Apparently, the *.htm and *.html entries are either missing, either put
as text/plain. Here are the HTTP request and the HTTP answer:

Request

GET
http://acssvn.honeywell.com/ECC/HomesNA/SoftwareProcess/trunk/ECC%20Home
s%20SWDP.htm Load Flags
Request Headers:
      Host[acssvn.honeywell.com]
      User-Agent[Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)]
 
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
      Accept-Language[en-us,en;q=0.5]
      Accept-Encoding[gzip,deflate]
      Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]
      Keep-Alive[300]
      Connection[keep-alive]
      Cookie[FESESSIONID=1jf68mkaeg1e8;
crucibleprefs1="D%3D1258446975875%3Bhed%3DY%3Bhdf%3DY%3Bslp%3Dt%3Basv%3D
fe"
      If-Modified-Since[Wed, 24 Jun 2009 14:42:16 GMT]
      If-None-Match["188//trunk/ECC Homes SWDP.htm"]
      Cache-Control[max-age=0]

Response

Date[Tue, 17 Nov 2009 08:38:47 GMT]
      Server[Apache/2.0.52 (Red Hat)]
      Last-Modified[Wed, 24 Jun 2009 14:42:16 GMT]
      Etag["188//trunk/ECC Homes SWDP.htm"]
      Accept-Ranges[bytes]
      Content-Length[17362]
      Connection[close]
      Content-Type[text/plain; charset=UTF-8]

 

I have added the svn-mime type to video file e.g. (abc.html)
svn:mime-type application/x-shockwave-flash, but it still it does not
play. When I don't embed as an object controller (video will be played
continuously, we can't stop, pause, there is no option to stop, pause),
the file plays in Firefox

 

Any idea what can be done!! Please suggest

 

Regards

R.R.Vishwanath

Desk: +91 80 26588360 Extn: 48555

Cell: +91 9008318114

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2424245

Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-11-25 14:21:52 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.