|
14.3 Controlling Fetch Behavior |
|
We can also exert control over how <fetch>
behaves
while it is obtaining a document, with <urlcp>
:
- <urlcp nbsp;timeout nbsp;10>
This sets the fetch timeout to 10 seconds (the default is 30): if
the document is not completely returned by then, the fetch is
abandoned and a partial document (if any) is returned with an
error. This provides a way to avoid holding up an entire script
for a slow server. Note that this is not the overall
script <TIMEOUT>
: the Vortex script will not exit at this
timeout, only <fetch>
. Thus this timeout should always be
less than the script timeout.
- <urlcp nbsp;maxpgsize nbsp;2MB>
This will allow up to 2 megabytes of raw data to be returned per
page before the fetch is abandoned with an error. (Early versions
of Vortex may require an explicit number.)
- <urlcp nbsp;user nbsp;bob>
This sets the user to use for fetching protected documents.
Similarly, the password can be set with pass
. (This is
not the Texis user/password for SQL.)
- <urlcp nbsp;proxy nbsp;"http://proxy.mysite.com/">
This will set the proxy server to use for fetches. Instead of
contacting Web servers directly, <fetch>
will use this
host as a proxy server to obtain the documents: useful if you're
behind a firewall and need to go through a proxy server.
See the manual on <urlcp>
for more options.