Last modified: 2010-05-15 15:37:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T4064, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2064 - Media type for JavaScript is hard-coded, and should not be
Media type for JavaScript is hard-coded, and should not be
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.5.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks: javascript
  Show dependency treegraph
 
Reported: 2005-05-03 17:19 UTC by Nico R.
Modified: 2010-05-15 15:37 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
JS media type patch against mediawiki-1.4.3 (21.05 KB, patch)
2005-05-03 17:21 UTC, Nico R.
Details
Patch against CVS HEAD as of 2005-05-04T10:33:08+0200 (21.28 KB, patch)
2005-05-04 08:31 UTC, Nico R.
Details
Fixed version of patch for HEAD branch (21.29 KB, patch)
2005-05-05 20:43 UTC, Nico R.
Details

Description Nico R. 2005-05-03 17:19:43 UTC
Currently, the MediaWiki software uses a hard-coded media type (MIME type) of
'text/javascript' for all scripts in the JavaScript language. No type of this
name has been registered with IANA by now, and some users probably want to use a
more correct type of, for example, 'application/x-javascript' until this issue
is resolved.
The attached patch adds the ability to configure the media type which shall be
used for scripts in the JavaScript language. This is a good idea as work on
getting media types for this language registered has already begun. The default
value set by this patch is 'text/javascript'; users can override it in
LocalSettings.php as usual.
The patch is for 1.4.3 or the REL1_4 branch (will work on both at the moment).
It will not apply cleanly to CVS HEAD.
Comment 1 Nico R. 2005-05-03 17:21:15 UTC
Created attachment 489 [details]
JS media type patch against mediawiki-1.4.3
Comment 2 Brion Vibber 2005-05-04 01:01:54 UTC
Thank you, W3C, for using non-assigned types as the only examples in your HTML specification 
documentation. :P
Comment 3 Ævar Arnfjörð Bjarmason 2005-05-04 02:35:44 UTC
The diff fails on HEAD (works on REL1_4). It's probably unwise to add this to
REL1_4 (closed for features)

$ patch -p1 < patch 
patching file includes/DefaultSettings.php
Hunk #1 succeeded at 374 with fuzz 1 (offset 35 lines).
patching file includes/EditPage.php
Hunk #1 succeeded at 923 (offset 173 lines).
Hunk #2 succeeded at 1015 (offset 173 lines).
patching file includes/RawPage.php
Hunk #1 succeeded at 20 (offset 3 lines).
patching file includes/Skin.php
Hunk #1 FAILED at 202.
Hunk #2 FAILED at 2121.
2 out of 2 hunks FAILED -- saving rejects to file includes/Skin.php.rej
patching file includes/SkinTemplate.php
Hunk #1 succeeded at 145 with fuzz 2.
Hunk #2 succeeded at 218 (offset 6 lines).
Hunk #3 FAILED at 861.
Hunk #4 succeeded at 907 (offset 44 lines).
1 out of 4 hunks FAILED -- saving rejects to file includes/SkinTemplate.php.rej
patching file skins/MonoBook.php
Hunk #1 succeeded at 61 with fuzz 1 (offset 8 lines).
Hunk #2 succeeded at 122 (offset 9 lines).
patching file skins/Standard.php
patching file skins/disabled/Amethyst.pt
patching file skins/disabled/Chick.pt
patching file skins/disabled/MonoBook.pt
can't find file to patch at input line 258
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur mediawiki-1.4.3/skins/disabled/Wikimania.php
mediawiki-1.4.3-jsmimetype/skins/disabled/Wikimania.php
|--- mediawiki-1.4.3/skins/disabled/Wikimania.php       2005-04-03
18:24:25.000000000 +0000
|+++ mediawiki-1.4.3-jsmimetype/skins/disabled/Wikimania.php    2005-05-03
16:51:04.000000000 +0000
--------------------------
File to patch: skins/disabled/Wikimania.php
skins/disabled/Wikimania.php: No such file or directory
Skip this patch? [y] y
Skipping patch.
2 out of 2 hunks ignored
patching file skins/disabled/WikimediaWiki.pt
Comment 4 Nico R. 2005-05-04 08:31:59 UTC
Created attachment 493 [details]
Patch against CVS HEAD as of 2005-05-04T10:33:08+0200

This patch applies cleanly against CVS HEAD as of a few seconds ago.
Comment 5 Nico R. 2005-05-05 20:43:49 UTC
Created attachment 501 [details]
Fixed version of patch for HEAD branch

Sorry, the previous patch had bugs in it: there were a few '$' characters
missing due to a copy-and-paste error. I created this fixed version by
inserting them into the patch file.
Comment 6 Ævar Arnfjörð Bjarmason 2005-05-05 21:00:55 UTC
Applied to HEAD, thanks for the patch.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links