/* ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. */
This module provides a set of default BEFORE and AFTER filters that can be registered by the Net manager to be called before and after a request. All filters can be registered either to be called globally (all requests) or locally (pr request basis).
This module is implemented by HTFilter.c, and it is a part of the W3C Reference Library.
#ifndef HTFILTER_H #define HTFILTER_H #include "WWWLib.h"
This is a standard set of BEFORE filters which the application may
initialize. This can be done in an easy way using the function
HTBeforeInit()
in the Initialization
interface.
Checks for registerd proxy servers or gateways and sees whether this request should be redirected to a proxy or a gateway. Proxies have higher priority than gateways so we look for them first! For HTTP/1.0 and HTTP/1.1 we may only send a full URL (including the host portion) to proxy servers. Therefore, we tell the Library whether to use the full URL or the traditional HTTP one without the host part.
extern HTNetCallback HTProxyFilter;
If we have a set of rules loaded (see the Rule manager) then check before each request whether how that should be translated. The trick is that a parent anchor has a "address" which is the part from the URL we used when we created the anchor. However, it also have a "physical address" which is the place we are actually going to look for the resource. Hence this filter translates from the address to the physical address (if any translations are found)
extern HTNetCallback HTRuleFilter;
Check if document is already loaded. The user can define whether the history list should follow normal expiration or work as a traditional history list where expired documents are not updated. We don't check for anything but existence proof of a document associated with the anchor as the definition is left to the application.
extern HTNetCallback HTMemoryCacheFilter;
Check the cache mode to see if we can use an already loaded version of this document. If so and our copy is valid then we don't have to go out and get it unless we are forced to
extern HTNetCallback HTCacheFilter;
The filter generates the credentials required to access a document Getting the credentials may involve asking the user in which case we use the methods registered by the HTAlert module
extern HTNetCallback HTCredentialsFilter;
HTAfterInit()
function in the
Initialization interface.
extern HTNetCallback HTCacheUpdateFilter;
It checks the status code from a request and generates an error/information message if required.
extern HTNetCallback HTInfoFilter;
The redirection handler only handles redirections on the GET
or HEAD
method (or any other safe method)
extern HTNetCallback HTRedirectFilter;
This filter handles a "305 Use Proxy"
response and retries the
request through the proxy
extern HTNetCallback HTUseProxyFilter;
The client side authentication filter uses the user dialog messages registered in the HTAlert module. By default these are the ones used by the line mode browser but you can just register something else.
extern HTNetCallback HTAuthFilter;
Default Logging filter using the log manager provided by the Log Manager.
extern HTNetCallback HTLogFilter;
#endif /* HTFILTER_H */