Last modified: 2014-07-19 15:32:01 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 T56053, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54053 - webserver treats script headers flaky
webserver treats script headers flaky
Status: RESOLVED WORKSFORME
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Marc A. Pelletier
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 01:54 UTC by Betacommand
Modified: 2014-07-19 15:32 UTC (History)
2 users (show)

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


Attachments

Description Betacommand 2013-09-12 01:54:32 UTC
Webservers are extremely flaky with regards to headers. While migrating from the toolserver I have noticed that the webservers on labs are quirky.

In some scripts I must define the header:
Content-Type: text/html\n\n
In other cases that same text is output as visible markup, and if there is any extra spaces in the headers (by accident or whatever) the webserver will not output the content. 

On the toolserver I never had to worry about that as the servers just worked. Now I am running into a lot of inconsistencies who's error messages give zero clues about the cause.
Comment 1 Tim Landscheidt 2013-09-12 04:13:09 UTC
Could you provide some examples, especially where Zeus gave a different output than Apache?

In general, "Content-Type:" (or other headers) appearing as visible mark-up means that the script sent non-header data to the webserver before the header.  That's not something that any webserver can fix.
Comment 2 Betacommand 2013-09-12 10:17:10 UTC
Ive since modified all my code to deal with this, but I have a function for building the top of an HTML file (title, scripts, ect) and in some cases the content type is required and in others it is displayed as raw text. 

example where content type is displayed: http://tools.wmflabs.org/betacommand-dev/nfcc/NFCC9.html

and an example of where its required and not displayed: http://tools.wmflabs.org/betacommand-dev/cgi-bin/img_removal.py?title=London_City_%28soccer_club%29
Comment 3 Tim Landscheidt 2013-12-29 00:09:50 UTC
Both examples look fine to me?!

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


Navigation
Links