Last modified: 2012-09-27 01:15:53 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 T33783, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31783 - Atom feeds on 1.16.5 have extraneous LF before XML header
Atom feeds on 1.16.5 have extraneous LF before XML header
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.16.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-17 20:53 UTC by Dan Nessett
Modified: 2012-09-27 01:15 UTC (History)
0 users

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


Attachments

Description Dan Nessett 2011-10-17 20:53:01 UTC
Somewhere between 1.16.2 and 1.16.5 atom feeds were broken. On the latter, an extraneous line feed is inserted at the beginning of the response.

On 1.16.2, the response begins (for Recent Changes atom feed):

0000   3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31  <?xml version="1
0010   2e 30 22 3f 3e 0a 3c 3f 78 6d 6c 2d 73 74 79 6c  .0"?>.<?xml-styl
0020   65 73 68 65 65 74 20 74 79 70 65 3d 22 74 65 78  esheet type="tex
0030   74 2f 63 73 73 22 20 68 72 65 66 3d 22 68 74 74  t/css"

On 1.16.5 it begins:

0000   0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22  .<?xml version="
0010   31 2e 30 22 3f 3e 0a 3c 3f 78 6d 6c 2d 73 74 79  1.0"?>.<?xml-sty
0020   6c 65 73 68 65 65 74 20 74 79 70 65 3d 22 74 65  lesheet type="te
0030   78 74 2f 63 73 73 22 20 68 72 65 66 3d 22 68 74  xt/css"

Notice the LF at the beginning on 1.16.5. This causes most browsers to barf (interestingly, Safari 5.1 on a Mac doesn't). Here is the error message from opera (which is more informative than the one from firefox):

XML parsing failed

XML parsing failed: syntax error (Line: 2, Character: 0)

Reparse document as HTML
Error:
XML declaration not at beginning of document

Specification:
http://www.w3.org/TR/REC-xml/

  1: 
  2: <?xml version="1.0"?>
  3: <?xml-stylesheet type="text/css" href="http://ec.citizendium.org/skins/common/feed.css?270"?>
  4: <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  5: 		<id>http://ec.citizendium.org/wiki?title=Special:RecentChanges&amp;feed=atom</id>

Perhaps this bug is related to 19055, but it wasn't clear from the description.
Comment 1 Dan Nessett 2011-10-18 01:12:31 UTC
This problem was caused by an extra line in LocalSettings.php after the ?>. I am marking it as an invalid bug report.

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


Navigation
Links