Commit bb3f5e13 authored by chiaming2000's avatar chiaming2000
Browse files

Java client: set tag to empty (if not set) to be backward compatible

with drive behavior. Current drive (2.4.0) requires tag field to be set
(not null).
parent 3b05f756
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -594,22 +594,16 @@ public class ClientProxy {
         */
        if (header.getMessageType() == MessageType.PUT) {
            if (commandBuilder.getBodyBuilder().getKeyValueBuilder().hasTag() == false) {
                // set tag to empty for backward compatibility with drive.
                // this can be removed when drive does not require the tag
                // to be set.
                commandBuilder.getBodyBuilder().getKeyValueBuilder()
                        .setTag(ByteString.EMPTY);

                // calculate value message digest
                // ByteString tag = Hmac.calcTag(kineticMessage, this.myKey);

                // ByteString tag =
                // MessageDigestUtil.calculateTag(Algorithm.SHA1,
                // kineticMessage.getValue());
                //
                // set tag
                // commandBuilder.getBodyBuilder().getKeyValueBuilder()
                // .setTag(tag);
                //
                // Algorithm algo = Algorithm.SHA1;
                // commandBuilder.getBodyBuilder().getKeyValueBuilder()
                // .setAlgorithm(algo);
                // .setAlgorithm(Algorithm.INVALID_ALGORITHM);
            }

        }

        /**