From 6e747f8dbee3889777e1f77819fb0a38463a0d49 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 16 Jul 2006 05:33:29 +0000
Subject: [PATCH] Update the LDAP connection handler so that the size units for the max request size configuration attribute are consistent with the size units used in various configuration attributes for the JE backend. In particular, the following are now true:
---
opendj-sdk/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java b/opendj-sdk/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
index 1433923..fecae18 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -121,6 +121,14 @@
/**
* The unit string that will be used to designate that a value is in
+ * kibibytes.
+ */
+ public static final String UNIT_KIBIBYTES = "KiB";
+
+
+
+ /**
+ * The unit string that will be used to designate that a value is in
* megabytes.
*/
public static final String UNIT_MEGABYTES = "MB";
@@ -128,6 +136,14 @@
/**
+ * The unit string that will be used to designate that a value is in
+ * mebibytes.
+ */
+ public static final String UNIT_MEBIBYTES = "MiB";
+
+
+
+ /**
* The hash map that holds the units that may be provided in conjunction with
* the maximum request size.
*/
@@ -137,8 +153,10 @@
static
{
SIZE_UNITS.put(UNIT_BYTES, 1.0);
- SIZE_UNITS.put(UNIT_KILOBYTES, 1024.0);
- SIZE_UNITS.put(UNIT_MEGABYTES, 1048576.0);
+ SIZE_UNITS.put(UNIT_KILOBYTES, 1000.0);
+ SIZE_UNITS.put(UNIT_KIBIBYTES, 1024.0);
+ SIZE_UNITS.put(UNIT_MEGABYTES, 1000000.0);
+ SIZE_UNITS.put(UNIT_MEBIBYTES, 1048576.0);
}
--
Gitblit v1.10.0