Thank you very much once again! :)

I was trying to use something similar, but both my attempt and yours fail :(

Also I was trying to use Persistent Private Variables (http://perldoc.perl.org/perlsub.html#Persistent-Private-Variables) - but failed as well (with same result - mess).

My script working in non blocking mode, using Coro::AnyEvent. So, replies could come back in random way (not in the same order I sent them). As result it's turned in complete mess - outgoing headers from one request and incoming from another one :) That's why I need to use only private variables there.

Looks like patching LWP only one way to achieve what I want, so it will return $response->request()->as_string() - real headers (like you suggest me already). Also I need to do something with internal responses anyway, since most of them will come with SSL/TLS connections.

Already patched few other modules anyway for my script, just trying to achieve what I need using other ways first. :)

Another option - switch to something from LWP, but I will need to rewrite way to many code, which already tested and working perfectly (so most likely not worth it).

Thank you once again for your huge help and for your time spending on me. I learned some new tricks, which I maybe use somewhere else. :)


In reply to Re^4: LWP is there any way to get "real" outgoing headers? by Anonymous Monk
in thread LWP is there any way to get "real" outgoing headers? by Anonymous Monk

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.