[hg] galaxy 3283: Patch from Assaf Gordon to support Apache's mo...
details: http://www.bx.psu.edu/hg/galaxy/rev/32c4edacdc99 changeset: 3283:32c4edacdc99 user: Nate Coraor <nate@bx.psu.edu> date: Wed Jan 27 14:18:14 2010 -0500 description: Patch from Assaf Gordon to support Apache's mod_xsendfile for offloading downloads to Apache. diffstat: dist-eggs.ini | 24 ++++++++++++------------ lib/galaxy/config.py | 1 + lib/galaxy/web/framework/base.py | 4 ++++ 3 files changed, 17 insertions(+), 12 deletions(-) diffs (63 lines): diff -r e8b17a1cfdf9 -r 32c4edacdc99 dist-eggs.ini --- a/dist-eggs.ini Wed Jan 27 13:34:53 2010 -0500 +++ b/dist-eggs.ini Wed Jan 27 14:18:14 2010 -0500 @@ -7,18 +7,18 @@ ; [hosts] -py2.4-linux-i686-ucs2 = basie.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.4 -py2.4-linux-i686-ucs4 = basie.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.4 -py2.5-linux-i686-ucs2 = basie.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.5 -py2.5-linux-i686-ucs4 = basie.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.5 -py2.6-linux-i686-ucs2 = basie.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.6 -py2.6-linux-i686-ucs4 = basie.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.6 -py2.4-linux-x86_64-ucs2 = scofield.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.4 -py2.4-linux-x86_64-ucs4 = scofield.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.4 -py2.5-linux-x86_64-ucs2 = scofield.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.5 -py2.5-linux-x86_64-ucs4 = scofield.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.5 -py2.6-linux-x86_64-ucs2 = scofield.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.6 -py2.6-linux-x86_64-ucs4 = scofield.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.6 +py2.4-linux-i686-ucs2 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.4 +py2.4-linux-i686-ucs4 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.4 +py2.5-linux-i686-ucs2 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.5 +py2.5-linux-i686-ucs4 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.5 +py2.6-linux-i686-ucs2 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs2/bin/python2.6 +py2.6-linux-i686-ucs4 = stegmaier.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-i686-ucs4/bin/python2.6 +py2.4-linux-x86_64-ucs2 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.4 +py2.4-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.4 +py2.5-linux-x86_64-ucs2 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.5 +py2.5-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.5 +py2.6-linux-x86_64-ucs2 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs2/bin/python2.6 +py2.6-linux-x86_64-ucs4 = straub.bx.psu.edu /afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.6 py2.4-macosx-10.3-fat-ucs2 = medeski.bx.psu.edu /usr/local/bin/python2.4 py2.5-macosx-10.3-fat-ucs2 = medeski.bx.psu.edu /usr/local/bin/python2.5 py2.6-macosx-10.3-fat-ucs2 = medeski.bx.psu.edu /usr/local/bin/python2.6 diff -r e8b17a1cfdf9 -r 32c4edacdc99 lib/galaxy/config.py --- a/lib/galaxy/config.py Wed Jan 27 13:34:53 2010 -0500 +++ b/lib/galaxy/config.py Wed Jan 27 14:18:14 2010 -0500 @@ -97,6 +97,7 @@ raise ConfigurationError( "user_library_import_dir specified in config (%s) does not exist" % self.user_library_import_dir ) self.allow_library_path_paste = kwargs.get( 'allow_library_path_paste', False ) # Configuration options for taking advantage of nginx features + self.apache_xsendfile = kwargs.get( 'apache_xsendfile', False ) self.nginx_x_accel_redirect_base = kwargs.get( 'nginx_x_accel_redirect_base', False ) self.nginx_upload_store = kwargs.get( 'nginx_upload_store', False ) self.nginx_upload_path = kwargs.get( 'nginx_upload_path', False ) diff -r e8b17a1cfdf9 -r 32c4edacdc99 lib/galaxy/web/framework/base.py --- a/lib/galaxy/web/framework/base.py Wed Jan 27 13:34:53 2010 -0500 +++ b/lib/galaxy/web/framework/base.py Wed Jan 27 14:18:14 2010 -0500 @@ -327,10 +327,14 @@ def send_file( start_response, trans, body ): # If configured use X-Accel-Redirect header for nginx base = trans.app.config.nginx_x_accel_redirect_base + apache_xsendfile = trans.app.config.apache_xsendfile if base: trans.response.headers['X-Accel-Redirect'] = \ base + os.path.abspath( body.name ) body = [ "" ] + elif apache_xsendfile: + trans.response.headers['X-Sendfile'] = os.path.abspath( body.name ) + body = [ "" ] # Fall back on sending the file in chunks else: body = iterate_file( body )
participants (1)
-
Greg Von Kuster