Set up a proxy server for a session with the URL module.
Entry | ||
---|---|---|
R0 | Flags: | |
Bits 0-31 reserved (0) | ||
R1 | Session identifier | |
R2 | Address of buffer containing a URL base | |
R3 | URL ‘method’ to proxy (address of URL fetch identifier to be proxied) | |
R4 | 0 => | Proxy request |
1 => | Don’t proxy request | |
All other values reserved |
Exit | |
---|---|
R0 | Status word (see SWI URL_Status for details) |
All other registers preserved |
Interrupt state is undefined.
SWI is not re-entrant.
This call is used to set up a proxy server to use for a session with the URL module. If R1 is zero then the proxy is considered global and is used for all sessions. If R1 is a valid session identifier then the proxy server for that session only is set. R2 is a pointer to a string containing the base URL to pass the request on to when a proxy request is made. This is of the form “http://www-cache.demon.co.uk:8080/” (note the trailing ‘/’). A common error is to omit the port number. If the port number is not specified, then the default port number is used. See discussion under URL_ProtocolRegister regarding how the default port number is derived.
R3 is a pointer to a buffer containing the initial part of the URL to proxy – the URL scheme (e.g. “http:”, “ftp:”). This system has the advantage that requests to certain hosts can be proxied and not others (e.g. by giving “http://www.acorn.co.uk/” as the scheme). However, if R4 is 1, this indicates that no matter how the proxy settings have been defined, requests to the base URL should not be proxied in this case (R3 is undefined). When a URL_GetURL request is received, the proxy settings are evaluated in the following order:
1 | Client no-proxy |
2 | Client proxy |
3 | Global no-proxy |
4 | Global proxy |
This is to ensure all client settings override global settings and thus remain safe for the given client – ie. a client which sets up a proxy server and then defaults all other URLs to no-proxy, can, no matter how the global settings are changed, be sure of where requests will end up. If R2=0 on entry, then all proxy settings for the specified session are cleared.
Calling this SWI does not result in any calls being made to protocol modules.