[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV using lynx to fetch source and mime headers for a document
From: |
Chris Lightfoot |
Subject: |
LYNX-DEV using lynx to fetch source and mime headers for a document |
Date: |
Sat, 7 Feb 1998 17:33:56 +0000 (GMT) |
Hi,
I'm writing a script to process text and HTML files grabbed from HTTP
servers, and which should reject other sorts of files. So, at the moment,
it does
lynx -head -dump <url>
and parses the result for a Content-type: header, which it checks. It then
does
lynx -source <url>
to get the source of the document. Unfortunately, if it is passed a URL
like
http://somewhere/something
when the real URL is
http://somewhere/something/
then the -head -dump command retrieves the headers for the redirect sent
back by the remote server, whereas the -source gets the text of the
document to which it is redirected. Is there any way to make lynx get the
headers for the final document in this way, or do I have to parse them
manually and call lynx -head -dump repeatedly?
Thanks in advance.
Chris Lightfoot | address@hidden (term time); address@hidden
| http://www.inactive.demon.co.uk/
| Some things have to be believed to be seen.
- LYNX-DEV using lynx to fetch source and mime headers for a document,
Chris Lightfoot <=