Skip to content

Commit 637501b

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 40658e0 commit 637501b

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
@@ -431,7 +431,7 @@ private void checkFirstRequest() {
431431
private int makeFirstRequest(int retry) {
432432
ClientResponse response = connection.path("ping").head();
433433
int statusCode = response.getClientResponseStatus().getStatusCode();
434-
if (200 <= statusCode && statusCode < 400) {
434+
if (statusCode != ClientResponse.Status.SERVICE_UNAVAILABLE.getStatusCode()) {
435435
response.close();
436436
return 0;
437437
}
@@ -1077,7 +1077,7 @@ private void putPostDocumentImpl(RequestLogger reqlog, String method, DocumentDe
10771077
"Document write with null value for " +
10781078
((uri != null) ? uri : "new document"));
10791079

1080-
if (isFirstRequest() && isStreaming(value)) {
1080+
if (isFirstRequest() && !isResendable && isStreaming(value)) {
10811081
nextDelay = makeFirstRequest(retry);
10821082
if (nextDelay != 0)
10831083
continue;
@@ -2541,7 +2541,7 @@ private void putPostValueImpl(RequestLogger reqlog, String method,
25412541
boolean isResendable = (handle == null) ? !isStreaming :
25422542
handle.isResendable();
25432543

2544-
if (isFirstRequest() && isStreaming) {
2544+
if (isFirstRequest() && !isResendable && isStreaming) {
25452545
nextDelay = makeFirstRequest(retry);
25462546
if (nextDelay != 0)
25472547
continue;

0 commit comments

Comments
 (0)