in reply to LWP is there any way to get "real" outgoing headers?

Use a perl echo server or if you got it, nc -vv -l -p 18080
  • Comment on Re: LWP is there any way to get "real" outgoing headers?

Replies are listed 'Best First'.
Re^2: LWP is there any way to get "real" outgoing headers?
by Anonymous Monk on May 24, 2014 at 04:19 UTC
    Thank you, I know how to get anything using external sniffer or proxy server (that's how I got real headers I posted in my question).
    My problem is - how to get them using LWP itself, not using any external program, including sniffers, proxy etc.

      Thank you, I know how to get anything using external sniffer or proxy server (that's how I got real headers I posted in my question). My problem is - how to get them using LWP itself, not using any external program, including sniffers, proxy etc.

      Hmm, have you ever looked inside of LWP?

      Since LWP doesn't give you that, the only way you do it by editing the many modules that comprise LWP :)

      I prefer simple solutions, speaking of which, you could start a socket server, then hijack/redirect connections with EXTRA_SOCK_OPTS... but you probably thought of that and don't like it for some reason (i don't like to write that much code :)

      OTOH, I just looked and saw LWP::Protocol::nogo / LWP::Protocol::PSGI - Override LWP's HTTP/HTTPS backend with your own PSGI applciation

      I think this is as close as you can get :)

        I prefer simple solutions, speaking of which, you could start a socket server, then hijack/redirect connections with EXTRA_SOCK_OPTS... but you probably thought of that and don't like it for some reason (i don't like to write that much code :)

        I'm using not only HTTP there, but also SSL/TLS, so...

        OTOH, I just looked and saw LWP::Protocol::nogo / LWP::Protocol::PSGI +- Override LWP's HTTP/HTTPS backend with your own PSGI applciation I think this is as close as you can get :)
        Thank you, I'll check them out :)