Update of /var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
In directory james.mmbase.org:/tmp/cvs-serv22896
Modified Files:
ContentTag.java
Log Message:
some clients (e.g. jmeter) may omit Accept headers. Don't give NPE then.
See also:
http://cvs.mmbase.org/viewcvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib
Index: ContentTag.java
===================================================================
RCS file:
/var/cvs/applications/taglib/src/org/mmbase/bridge/jsp/taglib/ContentTag.java,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- ContentTag.java 4 Sep 2008 12:31:07 -0000 1.67
+++ ContentTag.java 4 Nov 2008 22:33:58 -0000 1.68
@@ -38,7 +38,7 @@
*
* @author Michiel Meeuwissen
* @since MMBase-1.7
- * @version $Id: ContentTag.java,v 1.67 2008/09/04 12:31:07 michiel Exp $
+ * @version $Id: ContentTag.java,v 1.68 2008/11/04 22:33:58 michiel Exp $
**/
public class ContentTag extends LocaleTag {
@@ -508,7 +508,7 @@
addVary("Accept");
String acceptHeader = request.getHeader("Accept");
log.debug("a: " + acceptHeader);
- boolean acceptable = acceptHeader.indexOf(type) != -1;
+ boolean acceptable = acceptHeader == null ? true :
acceptHeader.indexOf(type) != -1;
if (! acceptable) {
if (a.startsWith("CRIPPLE")) {
log.debug("browser doesn't accept " + type + "
crippling now");
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs