Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Getting all Headers

by Yappo (Novice)
on Feb 05, 2008 at 15:25 UTC ( #666314=note: print w/replies, xml ) Need Help??


in reply to Getting all Headers

@ikegami: Result of your code is:
GET http://www.google.com/ User-Agent: libwww-perl/5.805
@naikonta: Result of your code is:
200 OK
Unfortunately no response headers...

Replies are listed 'Best First'.
Re^2: Getting all Headers
by naikonta (Curate) on Feb 08, 2008 at 00:21 UTC
    I use LWP::UserAgent version 2.036 from distribution libwww-perl-5.808. The method progress was added since libwww-perl-5.806. Upgrade your version and try again. I wonder however my code runs at all with libwww-perl-5.805 (that included LWP::UA 2.033 which didn't provide method progress yet).

    Update: How stupid of me. My code runs with LWP::UA 2.033 because the method progress isn't called at all


    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

      Thanks.
      I upgraded and succeeded to make this work, unfortunately this method does not bring the result I need using headers_as_string.
      I will give you an example:
      http://www.clipfish.de/player.php?videoid=MzkyOTN8OTA%3D
      has a video inside.
      There is no direct link to this video in the HTML source, the location will only be sent within the headers.
      Using LWP::UserAgent with method progress does not bring this URL which is as follows (from LiveHTTPheaders-log, snippet from header):
      http://pg1.clipfish.de/media/96/4efec90e3f12d631b4f5b490db152596.flv GET /media/96/4efec90e3f12d631b4f5b490db152596.flv HTTP/1.1 Host: pg1.clipfish.de ...
      Would it be possible to get the "host"-information and URL of the video from the headers using LWP or do I have to use another module or method?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://666314]
help
Chatterbox?
[choroba]: a young lady didn't want to let us into a compartment she was sitting in, but we had valid tickets
[Discipulus]: and milano is our mitteleuropa part..
[choroba]: then an old man came who had a valid ticket to the same compartment and they fought
[Corion]: hippo: Yeah, I might take that one so I don't get out of London too late if it comes to that ;)
[choroba]: she called carabinieri, the train had to stop and we had to testify to them. But we didn't miss the plane in the end.
[karlgoethebier]: good morning *
[Discipulus]: miracle choroba! and unbelivalbe carabinieri understood you
[choroba]: They even sent me a letter whether I'd be willing to come to Milano to testify in the court
[choroba]: I replied with "yes" but the trial never happened
[Discipulus]: dont be so sure choroba.. 11 years is not too long for an Eatalian judgement

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-11-20 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (286 votes). Check out past polls.

    Notices?