Skip Menu |

This queue is for tickets about the Catalyst-Controller-SOAP CPAN distribution.

Report information
The Basics
Id: 45552
Status: resolved
Priority: 0/
Queue: Catalyst-Controller-SOAP

People
Owner: Nobody in particular
Requestors: kmx [...] volny.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: PostApp.t fails on Win32/strawberry - proposed patch
Date: Wed, 29 Apr 2009 11:09:16 +0200
To: bug-Catalyst-Controller-SOAP [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi, I have experienced some problems with PostApp.t on Win32/strawberry perl. After some investigation I found out, that the way you start your testing application PostApp through "open3(...)" cleans up some enviromental variables including PATH (on Win32 it causes some DLLs not to be found). I propose the following patch: ... sub soap_xml_post { my $path = shift; my $content = shift; + my %copy_of_env = %ENV; - local %ENV; + local %ENV = %copy_of_env; $ENV{REMOTE_ADDR} ='127.0.0.1'; $ENV{CONTENT_LENGTH} = length $content; $ENV{CONTENT_TYPE} ='application/soap+xml'; ... -- kmx
Subject: Re: [rt.cpan.org #45552] AutoReply: PostApp.t fails on Win32/strawberry - proposed patch
Date: Sat, 30 May 2009 17:01:34 +0200
To: bug-Catalyst-Controller-SOAP [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
I would like to ask you to consider the patch proposed in previous post. I have noticed that you released the new module version and I am just reminding :)) If you do not like the patch we can discuss it (to be honest I borrowed the idea from C::Engine::HTTP). -- kmx
Subject: Re: [rt.cpan.org #45552] AutoReply: PostApp.t fails on Win32/strawberry - proposed patch
Date: Sat, 30 May 2009 12:14:06 -0300
To: bug-Catalyst-Controller-SOAP [...] rt.cpan.org
From: Daniel Ruoso <daniel [...] ruoso.com>
Em Sáb, 2009-05-30 às 11:02 -0400, kmx via RT escreveu: Show quoted text
> Queue: Catalyst-Controller-SOAP > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=45552 > > I would like to ask you to consider the patch proposed in previous post. > I have noticed that you released the new module version and I am just > reminding :)) > If you do not like the patch we can discuss it (to be honest I borrowed > the idea from C::Engine::HTTP).
Sorry, somehow I thought you had submitted that patch to the svn... I'll take a look again... daniel
Subject: Re: [rt.cpan.org #45552] AutoReply: PostApp.t fails on Win32/strawberry - proposed patch
Date: Sun, 07 Jun 2009 22:28:20 +0200
To: bug-Catalyst-Controller-SOAP [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Hi Daniel, thanks for the latest C::C::SOAP including Win32 compatibility patch; however I still have some troubles with PostApp.t on my Win32 box (tests hang up). I would like to propose to completely get rid of open3() calls and use Catalyst::Test instead. Please consider enclosed patch (it is against current trunk version). -- kmx
Index: t/PostApp.t =================================================================== --- t/PostApp.t (revision 10465) +++ t/PostApp.t (working copy) @@ -1,8 +1,9 @@ +use strict; +use warnings; use Test::More tests => 16; -use File::Spec::Functions; -use HTTP::Response; -use IPC::Open3; -use Symbol; +use lib 't/PostApp/lib'; +use Catalyst::Test 'PostApp'; +use HTTP::Request::Common; my $response; @@ -152,33 +153,10 @@ my $path = shift; my $content = shift; - local %ENV = %ENV; - $ENV{REMOTE_ADDR} ='127.0.0.1'; - $ENV{CONTENT_LENGTH} = length $content; - $ENV{CONTENT_TYPE} ='application/soap+xml'; - $ENV{SCRIPT_NAME} = $path; - $ENV{QUERY_STRING} = ''; - $ENV{CATALYST_DEBUG} = 1; - $ENV{REQUEST_METHOD} ='POST'; - $ENV{SERVER_PORT} ='80'; - $ENV{SERVER_NAME} ='pitombeira'; - $ENV{HTTP_SOAPAction} = 'http://example.com/actions/Greet'; - - my ($writer, $reader, $error) = map { gensym() } 1..3; - my $pid = open3($writer, $reader, $error, - $^X, (map { '-I'.$_ } @INC), - catfile(qw(t PostApp script postapp_cgi.pl))); - - print {$writer} $content; - close $content; - - my $response_str = join '', <$reader>; - map { warn '# '.$_ } <$error>; - - close $reader; - close $error; - waitpid $pid, 0; - return HTTP::Response->parse($response_str); + return request POST $path, + Content => $content, + Content_Type => 'application/soap+xml', + SOAPAction => 'http://example.com/actions/Greet'; } 1; Index: lib/Catalyst/Action/SOAP.pm =================================================================== --- lib/Catalyst/Action/SOAP.pm (revision 10465) +++ lib/Catalyst/Action/SOAP.pm (working copy) @@ -24,7 +24,7 @@ $c->req->method eq 'POST') { my $body = $c->req->body; my $xml_str = ref $body ? (join '', <$body>) : $body; - $c->log->debug("Incoming XML: $xml_str"); + $c->log->debug("Incoming XML: $xml_str") if $c->debug; eval { $c->stash->{soap}->envelope($xml_str); $c->stash->{soap}->parsed_envelope($self->xml_parser->parse_string($xml_str));
This bug was already fixed. Closing the ticket that was still open for no particular reason.