/* * ProxyPropertiesHandler.java * * Brazil project web application toolkit, * export version: 2.3 * Copyright (c) 1998-2004 Sun Microsystems, Inc. * * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is included as the file "license.terms", * and also available at http://www.sun.com/ * * The Original Code is from: * Brazil project web application toolkit release 2.3. * The Initial Developer of the Original Code is: suhler. * Portions created by suhler are Copyright (C) Sun Microsystems, Inc. * All Rights Reserved. * * Contributor(s): cstevens, suhler. * * Version: 2.2 * Created by suhler on 98/09/18 * Last modified by suhler on 04/08/30 09:02:32 * * Version Histories: * * 2.2 04/08/30-09:02:32 (suhler) * "enum" became a reserved word, change to "enumer". * * 2.1 02/10/01-16:36:26 (suhler) * version change * * 1.18 02/08/12-13:30:31 (suhler) * process ${...} constructs in the URL on a per-request basis * * 1.17 00/12/11-13:28:37 (suhler) * add class=props for automatic property extraction * * 1.16 00/11/14-14:56:59 (suhler) * added primitive URL mapping capability * * 1.15 00/10/31-10:18:20 (suhler) * doc fixes * * 1.14 00/05/10-10:54:48 (suhler) * Allow a string prefix to be prepended to all properties that are retrieved. * * 1.13 00/05/01-14:53:52 (suhler) * fix doc bug * * 1.12 00/04/20-11:48:34 (cstevens) * copyright. * * 1.11 00/02/02-14:49:53 (suhler) * specify alternate mime types to process * * 1.10 00/01/11-13:28:19 (suhler) * rename class * * 1.9 99/10/26-18:50:47 (cstevens) * case * * 1.8 99/10/26-17:10:23 (cstevens) * spelling * * 1.7 99/10/06-12:17:00 (suhler) * new proxy api's * * 1.6 99/03/30-09:30:18 (suhler) * documentation update * * 1.5 98/11/18-14:53:57 (suhler) * Changed to reflect new genericProxy api's * * 1.4 98/09/21-14:54:20 (suhler) * changed the package names * * 1.3 98/09/20-15:39:03 (suhler) * removed *'d imports * * 1.2 98/09/18-15:05:33 (suhler) * lint * * 1.2 98/09/18-10:08:55 (Codemgr) * SunPro Code Manager data about conflicts, renames, etc... * Name history : 3 2 handlers/ProxyPropertiesHandler.java * Name history : 2 1 handlers/RemoteStsHandler.java * Name history : 1 0 RemoteStsHandler.java * * 1.1 98/09/18-10:08:54 (suhler) * date and time created 98/09/18 10:08:54 by suhler * */ package sunlabs.brazil.handler; import java.io.ByteArrayInputStream; import java.io.IOException; import sunlabs.brazil.server.Handler; import sunlabs.brazil.server.Request; import sunlabs.brazil.server.Server; import sunlabs.brazil.util.http.MimeHeaders; import java.util.Enumeration; import java.util.Properties; import sunlabs.brazil.util.Format; /** * Obtain properties format content from remote websites, and * add it to the current request properties. * Many of the handlers * are designed to produce side effects, by inserting values into the * request properties (see {@link PropertiesHandler}). * If they are instead configured to produce the properties * in java properties format, then this handler * will read their output, and place the result in the request object on * their behalf. This capability allows certain handlers to be run on * other web sites, yet behave as if they are in the handler chain. * * The following request properties are used: *