/* * PublishHandler.java * * Brazil project web application toolkit, * export version: 2.3 * Copyright (c) 1999-2006 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 99/03/31 * Last modified by suhler on 06/11/13 15:04:03 * * Version Histories: * * 2.2 06/11/13-15:04:03 (suhler) * move MatchString to package "util" from "handler" * * 2.1 02/10/01-16:36:27 (suhler) * version change * * 1.15 01/07/20-11:32:03 (suhler) * MatchUrl -> MatchString * * 1.14 01/07/17-14:16:10 (suhler) * use MatchUrl * * 1.13 00/12/11-13:27:09 (suhler) * add class=props for automatic property extraction * * 1.3.1.1 00/05/31-13:46:12 (suhler) * revert to old version, and clean up * * 1.12 00/04/20-11:50:04 (cstevens) * Uses existing session * * 1.11 00/04/12-15:53:07 (cstevens) * pull AuthHandler out of PublishHandler. * * 1.10 00/03/10-17:02:38 (cstevens) * Removing unused member variables * * 1.9 99/10/26-18:51:01 (cstevens) * case * * 1.8 99/10/14-14:57:15 (cstevens) * resolve wilcard imports. * * 1.7 99/10/01-11:26:26 (cstevens) * Change logging to show prefix of Handler generating the log message. * * 1.6 99/09/15-14:40:09 (cstevens) * Rewritign http server to make it easier to proxy requests. * * 1.5 99/07/12-09:26:33 (suhler) * publish handler now uses credentials to match url prefixes * * 1.4 99/04/05-12:06:57 (suhler) * fils.canWrite() has weird semantics - don't use it. * * 1.3 99/04/01-09:05:25 (suhler) * re-write: * - removed built-in basic authentication * - starts separate authentication handler, allowing for * plug-in configuration policies * - default auth handler is AuthHandler (e.g. basic authentication * * 1.2 99/03/31-21:31:07 (suhler) * added alternate authentication scheme - still broken though * * 1.2 99/03/31-17:07:18 (Codemgr) * SunPro Code Manager data about conflicts, renames, etc... * Name history : 1 0 handlers/PublishHandler.java * * 1.1 99/03/31-17:07:17 (suhler) * date and time created 99/03/31 17:07:17 by suhler * */ package sunlabs.brazil.handler; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; import java.util.StringTokenizer; import sunlabs.brazil.util.MatchString; import sunlabs.brazil.server.FileHandler; import sunlabs.brazil.server.Handler; import sunlabs.brazil.server.Request; import sunlabs.brazil.server.Server; /** * Handler for supporting publishing from Communicator. * Launches an authentication handler to protect the content * from malicious users. *
* Looks for PUT
requests, and creates or modifies the
* content as indicated.
*
* The following request properties are used: *