Issue Details (XML | Word | Printable)

Key: DIRSERVER-390
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Karasulu
Reporter: Stefan Zoerner
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Extended operation causes client to hang

Created: 19/Sep/05 12:12 AM   Updated: 10/Feb/06 12:34 PM
Return to search "STDCXX HP/Compaq C++ issues"
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works patch_DIREVE-256.txt 2005-09-19 12:27 AM Stefan Zoerner 2 kB
Java Source File Licensed for inclusion in ASF works UnknownExtendedOperationTest.java 2005-09-19 12:20 AM Stefan Zoerner 3 kB

Resolution Date: 24/Sep/05 11:14 AM


 Description  « Hide
If a client calls an arbitrary extended operation, the server (namely the ExtendedHandler) throws a NotImplementedException. After this, the call of the client blocks, and the client hangs.
I suggest to change the handler to simply send an error code 2 (LDAP_PROTOCOL_ERROR) with message "Unrecognized extended operation" back to the client. This is the expected behavior if an extended operation is not supported by the server.

Attached you find a test case, which demands an always unknown extended operation (OID=1.1) and checks the result. Error code 2 leads to a CommunicationException in JNDI. I have tested this with several LDAP server implementations, behavior was always as expected.
I have also attached a patch, which changes the ExtendedHandler to behave like described above. Not a big thing, but it leads to compliant behavior for extended ops, even if we do not have any in place yet.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Stefan Zoerner made changes - 19/Sep/05 12:20 AM
Field Original Value New Value
Attachment UnknownExtendedOperationTest.java [ 12314432 ]
Stefan Zoerner added a comment - 19/Sep/05 12:27 AM
A patch which changes class org.apache.ldap.server.protocol.ExtendedHandler to behave as described in the issue.

Stefan Zoerner made changes - 19/Sep/05 12:27 AM
Attachment patch_DIREVE-256.txt [ 12314433 ]
Repository Revision Date User Message
ASF #291232 Sat Sep 24 01:26:12 UTC 2005 akarasulu Applied Stefan Zoerner's patch from DIREVE-256 here
http://issues.apache.org/jira/browse/DIREVE-256.
Files Changed
MODIFY /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ExtendedHandler.java

Repository Revision Date User Message
ASF #291234 Sat Sep 24 02:13:35 UTC 2005 akarasulu adding test contribution from stefan in DIREVE-256 here http://issues.apache.org/jira/browse/DIREVE-256
Files Changed
ADD /directory/apacheds/trunk/main/src/test/org/apache/ldap/server/UnknownExtendedOperationTest.java

Alex Karasulu made changes - 24/Sep/05 10:18 AM
Status Open [ 1 ] In Progress [ 3 ]
Alex Karasulu added a comment - 24/Sep/05 11:14 AM
Applied and committed patch in revision 291232 here:

http://svn.apache.org/viewcvs.cgi?view=rev&rev=291232

Also added new test case to apache-server main in commit 291234 here:

http://svn.apache.org/viewcvs.cgi?view=rev&rev=291234

Alex Karasulu made changes - 24/Sep/05 11:14 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Alex Karasulu added a comment - 24/Sep/05 11:14 AM
Thanks Stefan ... updating fix version.

Alex Karasulu made changes - 24/Sep/05 11:14 AM
Fix Version/s 0.9.3 [ 12310193 ]
Affects Version/s 0.9.3 [ 12310193 ]
Stefan Zoerner added a comment - 26/Sep/05 05:24 PM
Successfully verified. Thank you Alex for applying the patch -- the issue was not that crucial, but it caused my test suite to hang.

Stefan Zoerner made changes - 26/Sep/05 05:24 PM
Status Resolved [ 5 ] Closed [ 6 ]
Alex Karasulu made changes - 10/Feb/06 12:34 PM
Key DIREVE-256 DIRSERVER-390
Project Directory Server [ 10516 ] Directory ApacheDS [ 12310260 ]
Component/s protocol [ 11087 ]
Affects Version/s 0.9.2 [ 12310192 ]
Fix Version/s 0.9.3 [ 12310193 ]