--- http10.pm,old 2007-11-09 14:33:10.000000000 -0800 +++ http10.pm 2007-11-09 14:47:30.000000000 -0800 @@ -136,7 +136,20 @@ my $h = $request->headers->clone; my $cont_ref = $request->content_ref; + ## -- dboonstra + ## if content_ref is a CODE ref this is a runtime + ## error , but HTTP::Message only permits scalar refs + ## so this is not an issue $cont_ref = $$cont_ref if ref($$cont_ref); + + ## but if we want to get content from a CODE ref + ## it wont work as documented. + ## By the docs we may use $arg as content + ## and $arg may be a CODE ref, so lets do this + if ( length($$cont_ref) == 0 ) + { + $cont_ref = ref $arg ? $arg : \$arg; + } my $ctype = ref($cont_ref); # If we're sending content we *have* to specify a content length