https://jmarshall.com/easy/http/#http1.1c4
We can add any header when sending a 100-continue intermediate response.
But we can see in Vert.x code that when he is going to call the continueHandler
the response content is ignored, ripped off:
protected void doHandleResponse(HttpClientResponseImpl resp, long timeoutMs) {
if (reset == null) {
int statusCode = resp.statusCode();
if (followRedirects > 0 && statusCode >= 300 && statusCode < 400) {
Future<HttpClientRequest> next = client.redirectHandler().apply(resp);
if (next != null) {
next.setHandler(ar -> {
if (ar.succeeded()) {
handleNextRequest((HttpClientRequestImpl) ar.result(), timeoutMs);
} else {
handleException(ar.cause());
}
});
return;
}
}
if (statusCode == 100) {
if (continueHandler != null) {
continueHandler.handle(null);
}
} else {
if (respHandler != null) {
respHandler.handle(resp);
}
if (endHandler != null) {
endHandler.handle(null);
}
}
}
}
Obviously because the handler does not take any parameter.
The response is ripped of the call before:
private void checkHandleResponse() {
HttpClientResponseImpl resp;
synchronized (this) {
if (response != null) {
if (paused) {
return;
}
resp = response;
response = null;
} else {
return;
}
}
doHandleResponse(resp);
}
The specification is not precise about this point though, I didn't find any precise details about the official content of the 100-continue response from the server.
I would like to fix this with a minimum of modifications, any clues ?
Gerard