From e7e13627d69f3753f74ecb73832500fa84f9eb70 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sun, 22 Oct 2006 03:45:49 +0000
Subject: [PATCH] Update the LDIF reader to treat the tab as a line continuation character just like a space.  This is technically not allowed as per RFC 2849, but this will help improve compatibility with both OpenLDAP and the Sun Java System Directory Server.

---
 opends/src/server/org/opends/server/util/LDIFReader.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/util/LDIFReader.java b/opends/src/server/org/opends/server/util/LDIFReader.java
index c190dab..679bcaf 100644
--- a/opends/src/server/org/opends/server/util/LDIFReader.java
+++ b/opends/src/server/org/opends/server/util/LDIFReader.java
@@ -481,10 +481,13 @@
         // This is a comment.  Ignore it.
         continue;
       }
-      else if (line.charAt(0) == ' ')
+      else if ((line.charAt(0) == ' ') || (line.charAt(0) == '\t'))
       {
         // This is a continuation of the previous line.  If there is no
-        // previous line, then that's a problem.
+        // previous line, then that's a problem.  Note that while RFC 2849
+        // technically only allows a space in this position, both OpenLDAP and
+        // the Sun Java System Directory Server allow a tab as well, so we will
+        // too for compatibility reasons.  See issue #852 for details.
         if (lastLine >= 0)
         {
           lines.get(lastLine).append(line.substring(1));

--
Gitblit v1.10.0