greenrd 01/02/07 11:30:55
Modified: . changes.xml
src/org/apache/cocoon/processor/xslt XSLTProcessor.java
Log:
npe fix bug 541
Revision Changes Path
1.207 +5 -1 xml-cocoon/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon/changes.xml,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- changes.xml 2001/02/07 13:50:19 1.206
+++ changes.xml 2001/02/07 19:30:54 1.207
@@ -4,7 +4,7 @@
<!--
History of Cocoon changes
- $Id: changes.xml,v 1.206 2001/02/07 13:50:19 greenrd Exp $
+ $Id: changes.xml,v 1.207 2001/02/07 19:30:54 greenrd Exp $
-->
<changes title="History of Changes">
@@ -18,6 +18,10 @@
</devs>
<release version="@version@" date="@date@">
+ <action dev="RDG" type="fix" fixes-bug="541"
+ due-to="Dafang Zhang" due-to-email="[EMAIL PROTECTED]">
+ XSLTProcessor checks for null headers which previously caused errors.
+ </action>
<action dev="RDG" type="update">
LinkEncodingProcessor now encodes frames in framesets as well.
</action>
1.28 +8 -4
xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
Index: XSLTProcessor.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- XSLTProcessor.java 2001/02/01 21:02:50 1.27
+++ XSLTProcessor.java 2001/02/07 19:30:54 1.28
@@ -1,4 +1,4 @@
-/*-- $Id: XSLTProcessor.java,v 1.27 2001/02/01 21:02:50 greenrd Exp $ --
+/*-- $Id: XSLTProcessor.java,v 1.28 2001/02/07 19:30:54 greenrd Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -75,7 +75,7 @@
* This class implements an XSLT processor.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version $Revision: 1.27 $ $Date: 2001/02/01 21:02:50 $
+ * @version $Revision: 1.28 $ $Date: 2001/02/07 19:30:54 $
*/
public class XSLTProcessor implements Actor, Processor, Status, Defaults,
Cacheable {
@@ -146,8 +146,12 @@
if (headers != null) {
while (headers.hasMoreElements ()) {
String name = (String) headers.nextElement ();
- if (isValidName (name))
- params.put ("R_" + name, request.getHeader (name));
+ if (isValidName (name)) {
+ String value = request.getHeader (name);
+ if (value != null) {
+ params.put ("R_" + name, value);
+ }
+ }
}
}