[MOBY-guts] biomoby commit
José Manuel RodrÃguez Carrasco
jmrc at dev.open-bio.org
Mon Mar 21 11:59:32 UTC 2011
jmrc
Mon Mar 21 07:59:31 EDT 2011
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async
In directory dev.open-bio.org:/tmp/cvs-serv13412/Perl/MOBY-Server/lib/MOBY/Async
Modified Files:
SimpleServer.pm
Log Message:
[bugfix] There is a bug in CGI which only manifests when a server is behind more than one proxy.
The bug effect is that virtual_host returns more than one host, separated by commas.
This fix avoids the bug just parsing the result of virtual_host method.
moby-live/Perl/MOBY-Server/lib/MOBY/Async SimpleServer.pm,1.5,1.6
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm 2009/09/22 15:55:42 1.5
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Async/SimpleServer.pm 2011/03/21 11:59:31 1.6
@@ -122,6 +122,10 @@
my($query)=CGI->new();
my($proto)=($query->https())?'https':'http';
my($host)=$query->virtual_host();
+ # This line is needed to fix a bug in CGI library
+ # which only appears when the server is living behind
+ # more than one proxy
+ $host =~ s/^([^,]+),.*/$1/;
my($port)=$query->virtual_port();
if(($proto eq 'http' && $port eq '80') || ($proto eq 'https' && $port eq '443')) {
$port='';
More information about the MOBY-guts
mailing list