hi all...
I just upgraded to libwww-perl 5.800 and found that a few POST tests started failing where they didn't before, namely t/apache/post.t and t/http11/post.t.
I think the underlying problem is this change in HTTP::Message:
HTTP::Message will now allow an external 'content_ref' to be set. This can for instance be used to let HTTP::Request objects pick up content data from some scalar variable without having to copy it.
which I think means that you can no longer set
my $content = sub {...}; $request->content($content);
as we do in Apache::TestCommonPost::lwp_do(). I didn't write that code and am having a hard time following it, but I assume that the coderef assumed LWP would call the coderef until the C-L was fulfilled, which seems to no longer be true.
so, if anyone is familiar with how TestCommonPost works and what it is testing, it would be really helpful if you could explain why the buffering in lwp_do is required and why we can't just set $response->content to the C-L size up front.
What lwp_do was trying to do is to avoid the copying of 10MB strings between the A-T code and LWP, feeding LWP in chunks. I suppose that 5.800 dropped that functionality, but since it made content_ref settable, I've used that as a workaround.
Now, that was definitely not a showstopper, since it seems like everything in TestCommon* is really httpd-test specific. Or do you think it can be reused anywhere else? If not, may be we should drop all that code from Apache-Test and move it into perl-framework/t/lib?
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com