2. Choosing the Backend Server

When the proxy receives a Z39.50 Initialize Request from a Z39.50 client, it determines the backend server by the following rules:

  1. If the InitializeRequest PDU from the client includes an otherInfo element with OID 1.2.840.10003.10.1000.81.1, then the contents of that element specify the server to be used, in the usual YAZ address format (typically tcp:hostname:port) as described in the Addresses section of the YAZ manual.

  2. Otherwise, the Proxy uses the default server, if one was specified in the proxy configuration file. See Section 9.2, “target”.

  3. Otherwise, the Proxy uses the default server, if one was specified on the command-line with the -t option.

  4. Otherwise, the proxy closes the connection with the client.

If the proxy receives an SRU request, the following rules are used.

  1. If default target has Explain information with a database that matches the path of the HTTP request of SRU that backend server is used for SRU operation.

  2. Otherwise the service will return HTTP 404 (Not found).