'Redirects a user accessing a Data Source tool to its target action link.
This method will subvert mix-mode content blocking in several browsers when
accessing non-https data_source tools from an https galaxy server.
Tested as working on Safari 7.0 and FireFox 26
Subverting did not work on Chrome 31'

@web.expose
def data_source_redirect(self, trans, tool_id=None):

    if (tool_id is None):
        return trans.response.send_redirect(url_for(controller='root', action='welcome'))
    tool = self.__get_tool(tool_id)
    if (not tool):
        log.error("data_source_redirect    called    with    tool    id    '%s'    but    no    such    tool    exists", tool_id)
        trans.log_event(("Tool    id    '%s'    does    not    exist" % tool_id))
        trans.response.status = 404
        return trans.show_error_message(("Tool    '%s'    does    not    exist." % escape(tool_id)))
    if isinstance(tool, DataSourceTool):
        link = url_for(tool.action, **tool.get_static_param_values(trans))
    else:
        link = url_for(controller='tool_runner', tool_id=tool.id)
    return trans.response.send_redirect(link)
