Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv9138/UI
Modified Files:
XMLRPC.pm
Log Message:
Fix a bug in XML-RPC that when a malformed request is made it would crash POPFile
Index: XMLRPC.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/XMLRPC.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** XMLRPC.pm 31 Aug 2003 22:25:55 -0000 1.6
--- XMLRPC.pm 2 Oct 2003 16:44:22 -0000 1.7
***************
*** 42,45 ****
--- 42,47 ----
require XMLRPC::Transport::HTTP;
+ my $eol = "\015\012";
+
#----------------------------------------------------------------------------
# new
***************
*** 182,195 ****
my $request = $client->get_request();
! $self->{server__}->request( $request );
! # Note the direct call to SOAP::Transport::HTTP::Server::handle() here, this is
! # because we have taken the code from XMLRPC::Transport::HTTP::Server::handle()
! # and reproduced a modification of it here, accepting a single request and handling
! # it. This call to the parent of XMLRPC::Transport::HTTP::Server will actually
! # deal with the request
! $self->{server__}->SOAP::Transport::HTTP::Server::handle();
! $client->send_response( $self->{server__}->response );
$client->close();
}
--- 184,203 ----
my $request = $client->get_request();
! # Note that handle() relies on the $request being perfectly valid, so here we
! # check that it is, if it is not then we don't want to call handle and we'll
! # return out own error
! if ( defined( $request ) ) {
! $self->{server__}->request( $request );
! # Note the direct call to SOAP::Transport::HTTP::Server::handle() here, this is
! # because we have taken the code from XMLRPC::Transport::HTTP::Server::handle()
! # and reproduced a modification of it here, accepting a single request and handling
! # it. This call to the parent of XMLRPC::Transport::HTTP::Server will actually
! # deal with the request
!
! $self->{server__}->SOAP::Transport::HTTP::Server::handle();
! $client->send_response( $self->{server__}->response );
! }
$client->close();
}
|