Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Mime type for raw file sources is always text/plain #206

Open
jgm opened this Issue Jul 9, 2011 · 0 comments

Comments

Projects
None yet
1 participant
Owner

jgm commented Jul 9, 2011

What steps will reproduce the problem?

[dima@gititvm ~]$ wget gitit.golubovsky.org/_showraw/codemirror/css/
docs.css
--2009-09-12 23:11:38-- 
http://gitit.golubovsky.org/_showraw/codemirror/css/docs.css
Resolving gitit.golubovsky.org... 66.92.54.88, 2002:425c:3658::1
Connecting to gitit.golubovsky.org|66.92.54.88|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 529 [text/plain]
Saving to: `docs.css'

100%[==========================================================>]
529         --.-K/s   in 0s

2009-09-12 23:11:38 (310 KB/s) - `docs.css' saved [529/529]

[dima@gititvm ~]$ wget gitit.golubovsky.org/_showraw/codemirror/
select.js
--2009-09-12 23:11:53-- 
http://gitit.golubovsky.org/_showraw/codemirror/select.js
Resolving gitit.golubovsky.org... 66.92.54.88, 2002:425c:3658::1
Connecting to gitit.golubovsky.org|66.92.54.88|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21732 (21K) [text/plain]
Saving to: `select.js'

100%[==========================================================>]
21,732      --.-K/s   in 0s

2009-09-12 23:11:53 (12.4 MB/s) - `select.js' saved [21732/21732]

[dima@gititvm ~]$ grep -E js\|css /etc/mime.types
application/vnd.ericsson.quickcall
application/x-javascript                        js
text/css                                        css

[dima@gititvm ~]$ grep mime.types var/gitit-public/wikidata/config/
gitit-public.conf
mime-types-file: /etc/mime.types 

That is, even though mime.types file contains some content type for the
given file extension, _showraw response is always text/plain

In the same time _showraw on a .png file results in "file not found" screen.

What version of the product are you using? On what operating system?

Development (0.6.2)

Please provide any additional information below.

See this discussion:
http://groups.google.com/group/gitit-discuss/browse_thread/thread/0ab3615105e280b2/89704e4a224491a2#89704e4a224491a2

Providing correct MIME type per file extension even for _showraw mode does
not contain any controversy: wiki pages have extension .page, thus can
always be forced to text/plain while other files would keep their MIME type
per extension.


Google Code Info:
Issue #: 63
Author: golubov...@gmail.com
Created On: 2009-09-14T09:21:02.000Z
Closed On: 

@jgm jgm was assigned Jul 9, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment