From 475b62de777edb285f32607cd4501b9c9d551d63 Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Mon, 19 Nov 2012 15:25:30 +0000
Subject: [PATCH] Fix OPENDJ-502 DSML gateway not correctly forwarding modifications to userCertificate;binary attributes
---
opends/src/dsml/org/opends/dsml/protocol/DSMLServlet.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLServlet.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLServlet.java
index 83191ae..e127c91 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLServlet.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLServlet.java
@@ -124,6 +124,7 @@
private static final String AUTHENTICATION_FAILED = "authenticationFailed";
private static final String COULD_NOT_CONNECT = "couldNotConnect";
private static final String GATEWAY_INTERNAL_ERROR = "gatewayInternalError";
+ private static final String UNRESOLVABLE_URI = "unresolvableURI";
private static final String UNKNOWN_ERROR = "Unknown error";
@@ -199,11 +200,10 @@
* and if the value's true then mark that OID (1.2.3.4.5) as one returning
* a string value.
*/
- Enumeration<String> names = config.getServletContext()
- .getInitParameterNames();
+ Enumeration names = config.getServletContext().getInitParameterNames();
while (names.hasMoreElements())
{
- String name = names.nextElement().toString();
+ String name = (String) names.nextElement();
if (name.startsWith(EXOPSTRINGPREFIX) &&
Boolean.valueOf(config.getServletContext().getInitParameter(name)))
{
@@ -650,6 +650,8 @@
}
} else if ( t instanceof LDAPConnectionException ) {
errorResponse.setType(COULD_NOT_CONNECT);
+ } else if ( t instanceof IOException ) {
+ errorResponse.setType(UNRESOLVABLE_URI);
} else {
errorResponse.setType(GATEWAY_INTERNAL_ERROR);
}
--
Gitblit v1.10.0