Project

General

Profile

Actions

Bug #5365

closed

WEBrick lacks the application/javascript and image/svg+xml MIME types.

Added by postmodern (Hal Brodigan) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
-
Backport:
[ruby-core:39704]

Description

WEBrick::HTTPUtils::DefaultMimeTypes (webrick/httputils.rb) does not define MIME types for the file extensions 'js' and 'svg'. This forces projects that use WEBrick directly (such as Jekyll) to define these MIME types.


Files

httputils.rb.patch (645 Bytes) httputils.rb.patch postmodern (Hal Brodigan), 09/26/2011 05:12 AM
httputils.rb.patch (646 Bytes) httputils.rb.patch postmodern (Hal Brodigan), 09/26/2011 11:22 AM

Updated by naruse (Yui NARUSE) over 12 years ago

RFC3203 says SVG's MIME Type is image/svg+xml, isn't it?
http://www.ietf.org/rfc/rfc3023.txt

Updated by postmodern (Hal Brodigan) over 12 years ago

Oops, you are correct. Patch re-uploaded.

Actions #3

Updated by naruse (Yui NARUSE) over 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33339.
Hal, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/webrick/httputils.rb: Add MIME Type definition of .js and .svg.
    patched by Hal Brodigan. [ruby-core:39704] [Bug #5365]

Updated by duerst (Martin Dürst) over 12 years ago

  • ruby -v changed from ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] to -

On 2011/09/26 9:52, Yui NARUSE wrote:

Issue #5365 has been updated by Yui NARUSE.

RFC3203 says SVG's MIME Type is image/svg+xml, isn't it?

I think you meant RFC 3023.

http://www.ietf.org/rfc/rfc3023.txt

No, that uses this just for an example. For the actual registration,
please see:
http://www.iana.org/assignments/media-types/image/index.html and
http://www.w3.org/TR/SVG/mimereg.html.

(For application/javascript, please see
http://www.rfc-editor.org/rfc/rfc4329.txt and
http://www.iana.org/assignments/media-types/application/index.html.)

Regards, Martin.


Bug #5365: WEBrick lacks the application/javascript and image/svg+xml MIME types.
http://redmine.ruby-lang.org/issues/5365

Author: Hal Brodigan
Status: Open
Priority: Normal
Assignee:
Category: lib
Target version:
ruby -v: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

WEBrick::HTTPUtils::DefaultMimeTypes (webrick/httputils.rb) does not define MIME types for the file extensions 'js' and 'svg'. This forces projects that use WEBrick directly (such as Jekyll) to define these MIME types.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0