Thanks -- I did know about the protocol method, but couldn't understand how I could use it before the message went out. Your code does output the correct thing from the debugger, but now I'm getting an error from HTTP::Message that it's having trouble cloning the headers (line 27).

The investigation continues. Thanks!

Update: OK -- going through HTTP::Request means you have to reorganize the parameters from a hashref to a refarray to a flattened hash:

$refhash = { UserId => 533, Something => 'foobart' } $refarray = [ map { $_, $refhash->{$_} } keys %$refhash ];
so that the code in HTTP::Headers
sub header { my $self = shift; Carp::croak('Usage: $h->header($field, ...)') unless @_; my(@old); my %seen; while (@_) { my $field = shift; my $op = @_ ? ($seen{lc($field)}++ ? 'PUSH' : 'SET') : 'GET'; @old = $self->_header($field, shift, $op); } return @old if wantarray; return $old[0] if @old <= 1; join(", ", @old); }
accepts the data. Now I'm back to getting a 500 Internal Server error from the server I'm hitting .. I'll check back tomorrow when I can talk to the SysAdmin in Europe.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds


In reply to Re^2: Trying to get HTTP/1.1 at end of request by talexb
in thread Trying to get HTTP/1.1 at end of request by talexb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.