in reply to HTTP Unblessed reference question

From HTTP::Request docs...

$r = HTTP::Request->new($method, $uri, $header, content)

Constructs a new "HTTP::Request" object describing a request on the object "$uri" using method "$method". The "$uri" argument can be either a string, or a reference to a "URI" object. The optional $header argu­ment should be a reference to an "HTTP::Headers" object. The optional $content argument should be a string.

Your third argument is an array reference, not an HTTP::Headers object. I think you wanted to use HTTP::Request::Common; that uses that syntax.


Update: Briefly had a "You might try" section, but removed it after realizing that the array did not appear to contain HTTP headers.

Update 2: Added recommendation for HTTP::Request::Common

Replies are listed 'Best First'.
Re: Re: HTTP Unblessed reference question
by abdiel (Monk) on Apr 16, 2002 at 17:26 UTC
    Thank you, I didn't realize the subtle differenc between HTTP::Request and HTTP::Request::Common. It's not dying on me now. On a side note, I saw my main post got downvoted. I'm assuming that is because I'm posting a question about code that could (forget could, it is) very shady in nature. I'm not a big fan of exploit based tests myself, I'd rather go digging through the metabase to get the information as to whether or not the server is vulnerable. Unfortunately, I have not found a reliable way to determine proper permissions using metabase and other "privileged" connection methods (read: methods unusable by an outside attacker). I can only offer the monestary my assurances that this code isn't being used to attack other servers (at least not by me), particularly when there is a much better, cleaner, and better written alternative out there to launch these attacks. If I'm downvoted, so be it. Next time I'll learn to disguise my question in a more palatable manner.