# HG changeset patch # User paulb # Date 1094153590 0 # Node ID f689c28057277f5ef03a05ad76baf873378d7501 # Parent 298e1509dff4125226472f05442e9ff0651bf385 [project @ 2004-09-02 19:33:10 by paulb] Added documentation about charsets/encodings. Updated the licences. diff -r 298e1509dff4 -r f689c2805727 docs/CHARSET.txt --- a/docs/CHARSET.txt Thu Sep 02 19:32:50 2004 +0000 +++ b/docs/CHARSET.txt Thu Sep 02 19:33:10 2004 +0000 @@ -1,3 +1,12 @@ +Unicode and Character Sets in WebStack +-------------------------------------- + +Unicode text should be converted to the chosen character set (encoding) when +written to the response stream. + +Classic Python strings are written directly to the response stream without +encoding. + Character Set Semantics in WebStack ----------------------------------- @@ -16,4 +25,24 @@ originated. It is therefore also necessary to remain consistent in the usage of character -sets when specifying content types. +sets when specifying content types. WebStack enforces the following rules: + + * Where the request content type specifies a character set, this is used to + decode the request body parameters unless explicitly overridden. + + * Where the request content type does not specify a character set, a default + character set is used to decode the request body parameters unless + overridden. + + * Where the response content type specifies a character set, this is used to + encode Unicode response data (eg. HTML pages). + + * Where the response content type does not specify a character set, a default + character set is used to encode Unicode response data (eg. HTML pages). + +Framework Behaviour +------------------- + +The Java Servlet API imposes restrictions on decoding request body parameters +by stating that the character encoding (ServletRequest.setCharacterEncoding) +must be set before any reading of the request body is attempted. diff -r 298e1509dff4 -r f689c2805727 docs/LICENCE-PyServlet.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/LICENCE-PyServlet.txt Thu Sep 02 19:33:10 2004 +0000 @@ -0,0 +1,147 @@ +The modified PyServlet class included with WebStack is covered by copyrights +and the licence of the Jython project and is reproduced below. + +HISTORY OF THE SOFTWARE +======================= + +JPython was created in late 1997 by Jim Hugunin. Jim was also the +primary developer while he was at CNRI. In February 1999 Barry Warsaw +took over as primary developer and released JPython version 1.1. +In October 2000 Barry helped move the software to SourceForge +where it was renamed to Jython. Jython 2.0 is developed by a group +of volunteers. + + +The standard library is covered by the BeOpen / CNRI license. See the +Lib/LICENSE file for details. + +The oro regular expresion matcher is covered by the apache license. +See the org/apache/LICENSE file for details. + +The zxJDBC package was written by Brian Zimmer and originally licensed +under the GNU Public License. The package is now covered by the Jython +Software License. + +Jython changes Software License. +================================ + +Copyright (c) 2000, Jython Developers +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the distribution. + + - Neither the name of the Jython Developers nor the names of + its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + +JPython Software License. +========================= + +______________________________________________________________________ + +IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. + +BY CLICKING ON THE "ACCEPT" BUTTON WHERE INDICATED, OR BY INSTALLING, +COPYING OR OTHERWISE USING THE SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO +THE TERMS AND CONDITIONS OF THIS AGREEMENT. + +______________________________________________________________________ + +JPython version 1.1.x + + 1. This LICENSE AGREEMENT is between the Corporation for National Research + Initiatives, having an office at 1895 Preston White Drive, Reston, VA + 20191 ("CNRI"), and the Individual or Organization ("Licensee") + accessing and using JPython version 1.1.x in source or binary form and + its associated documentation as provided herein ("Software"). + + 2. Subject to the terms and conditions of this License Agreement, CNRI + hereby grants Licensee a non-exclusive, non-transferable, royalty-free, + world-wide license to reproduce, analyze, test, perform and/or display + publicly, prepare derivative works, distribute, and otherwise use the + Software alone or in any derivative version, provided, however, that + CNRI's License Agreement and CNRI's notice of copyright, i.e., + "Copyright ©1996-1999 Corporation for National Research Initiatives; + All Rights Reserved" are both retained in the Software, alone or in any + derivative version prepared by Licensee. + + Alternatively, in lieu of CNRI's License Agreement, Licensee may + substitute the following text (omitting the quotes), provided, however, + that such text is displayed prominently in the Software alone or in any + derivative version prepared by Licensee: "JPython (Version 1.1.x) is + made available subject to the terms and conditions in CNRI's License + Agreement. This Agreement may be located on the Internet using the + following unique, persistent identifier (known as a handle): + 1895.22/1006. The License may also be obtained from a proxy server on + the Web using the following URL: http://hdl.handle.net/1895.22/1006." + + 3. In the event Licensee prepares a derivative work that is based on or + incorporates the Software or any part thereof, and wants to make the + derivative work available to the public as provided herein, then + Licensee hereby agrees to indicate in any such work, in a prominently + visible way, the nature of the modifications made to CNRI's Software. + + 4. Licensee may not use CNRI trademarks or trade name, including JPython + or CNRI, in a trademark sense to endorse or promote products or + services of Licensee, or any third party. Licensee may use the mark + JPython in connection with Licensee's derivative versions that are + based on or incorporate the Software, but only in the form + "JPython-based ___________________," or equivalent. + + 5. CNRI is making the Software available to Licensee on an "AS IS" basis. + CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY + OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY + REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY + PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE + ANY THIRD PARTY RIGHTS. + + 6. CNRI SHALL NOT BE LIABLE TO LICENSEE OR OTHER USERS OF THE SOFTWARE FOR + ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF + USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE + THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. SOME STATES DO NOT + ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY SO THE ABOVE DISCLAIMER + MAY NOT APPLY TO LICENSEE. + + 7. This License Agreement may be terminated by CNRI (i) immediately upon + written notice from CNRI of any material breach by the Licensee, if the + nature of the breach is such that it cannot be promptly remedied; or + (ii) sixty (60) days following notice from CNRI to Licensee of a + material remediable breach, if Licensee has not remedied such breach + within that sixty-day period. + + 8. This License Agreement shall be governed by and interpreted in all + respects by the law of the State of Virginia, excluding conflict of law + provisions. Nothing in this Agreement shall be deemed to create any + relationship of agency, partnership, or joint venture between CNRI and + Licensee. + + 9. By clicking on the "ACCEPT" button where indicated, or by installing, + copying or otherwise using the Software, Licensee agrees to be bound by + the terms and conditions of this License Agreement. + + [ACCEPT BUTTON] + diff -r 298e1509dff4 -r f689c2805727 docs/LICENCE.txt --- a/docs/LICENCE.txt Thu Sep 02 19:32:50 2004 +0000 +++ b/docs/LICENCE.txt Thu Sep 02 19:33:10 2004 +0000 @@ -19,3 +19,8 @@ USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Licence for Other Software +-------------------------- + +See the LICENCE-PyServlet.txt file for the PyServlet copyrights and licence.