Mustafa Kilic <[EMAIL PROTECTED]> wrote:

> I wrote a program to get HEAD section of a HTML file [...]
> my $res = LWP::UserAgent->new->request(HTTP::Request->new(HEAD => $startUrl));

You seem to be mixing up two separate uses of HEAD -- one in
HTML and one in HTTP.  It is confusing, but they're really not
related.  A HEAD request in HTTP returns the header lines,
things like content type and time of last modification (the
same ones that come before the document content when you do a
GET request).  And it does that for all types of resources,
including images, PDF files, sound files, and other things
that aren't in HTML.  It doesn't return the HEAD section of an
HTML file, which is part of the content.  For that you'll need
to do a GET request.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to