Skip to content

Commit e483b5e

Browse files
committed
since StringHandler is incorrectly considered streaming, but is correctly setting isResendable(true), let's check isResendable and not treat a request as streaming if isResendable(true)
1 parent 6e4e68b commit e483b5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/marklogic/client/impl/JerseyServices.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ private void checkFirstRequest() {
430430
private int makeFirstRequest(int retry) {
431431
ClientResponse response = connection.path("ping").head();
432432
int statusCode = response.getClientResponseStatus().getStatusCode();
433-
if (200 <= statusCode && statusCode < 400) {
433+
if (statusCode != ClientResponse.Status.SERVICE_UNAVAILABLE.getStatusCode()) {
434434
response.close();
435435
return 0;
436436
}
@@ -1076,7 +1076,7 @@ private void putPostDocumentImpl(RequestLogger reqlog, String method, DocumentDe
10761076
"Document write with null value for " +
10771077
((uri != null) ? uri : "new document"));
10781078

1079-
if (isFirstRequest() && isStreaming(value)) {
1079+
if (isFirstRequest() && !isResendable && isStreaming(value)) {
10801080
nextDelay = makeFirstRequest(retry);
10811081
if (nextDelay != 0)
10821082
continue;
@@ -2537,7 +2537,7 @@ private void putPostValueImpl(RequestLogger reqlog, String method,
25372537
boolean isResendable = (handle == null) ? !isStreaming :
25382538
handle.isResendable();
25392539

2540-
if (isFirstRequest() && isStreaming) {
2540+
if (isFirstRequest() && !isResendable && isStreaming) {
25412541
nextDelay = makeFirstRequest(retry);
25422542
if (nextDelay != 0)
25432543
continue;

0 commit comments

Comments
 (0)