in reply to Re^3: LWP is there any way to get "real" outgoing headers?
in thread LWP is there any way to get "real" outgoing headers?
> Your question makes no sense.
Well. taint, with all due respect, your reply (all 3 of them) make even less sense than my question. Since you replying on something different.
And once again - I'm not here to insult someone, that's pointless. I'm just trying to solve issue I have. But according to replies above that's not possible with LWP itself (I'll need to use another modules or hack original ones).
I'm clearly asking how to get outgoing headers, generated by LWP, not how to modify/change them (I know how to do that and successfully doing that for years in my code).
Now I need to log them.
The problem is - LWP return headers different to headers which he sent out.
Headers I can get from LWP, for example using $response->request()->as_string():
GET http://example.com/ User-Agent: libwww-perl/6.05
GET / HTTP/1.1 Host: example.com User-Agent: libwww-perl/6.05 Connection: keep-alive
You could read edited reply from InfiniteSilence above.
"I'm looking for a way to get "real" outgoing headers, generated by LWP (I need them for logging/debugging purpose)."
So, what exactly wrong with my question? (except bad English)
P.S. And just for your info, you can't control all headers, using code you posted above. In code, I posted as example in my initial question you will see how you can control Connection (to avoid sending "TE, close" instead of "keep-alive") and how to change HTTP version to 1.0 / 1.1 (in case you need that).
|
|---|