SWS-583 - AbstractHttpSenderConnection does not immediately recognise HTTP 204 has no content-length
This commit is contained in:
@@ -60,7 +60,9 @@ public abstract class AbstractHttpSenderConnection extends AbstractSenderConnect
|
||||
* Receiving response
|
||||
*/
|
||||
protected final boolean hasResponse() throws IOException {
|
||||
if (HttpTransportConstants.STATUS_ACCEPTED == getResponseCode()) {
|
||||
int responseCode = getResponseCode();
|
||||
if (HttpTransportConstants.STATUS_ACCEPTED == responseCode ||
|
||||
HttpTransportConstants.STATUS_NO_CONTENT == responseCode) {
|
||||
return false;
|
||||
}
|
||||
long contentLength = getResponseContentLength();
|
||||
|
||||
@@ -41,6 +41,9 @@ public interface HttpTransportConstants extends TransportConstants {
|
||||
/** The "202 Accepted" status code. */
|
||||
int STATUS_ACCEPTED = 202;
|
||||
|
||||
/** The "204 No Content" status code. */
|
||||
int STATUS_NO_CONTENT = 204;
|
||||
|
||||
/** The "404 Not Found" status code. */
|
||||
int STATUS_NOT_FOUND = 404;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user