Skip to content

Restore RequestLifecycle for backwards compatibility with Servet #10224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

dstepanov
Copy link
Contributor

No description provided.

@dstepanov dstepanov requested a review from yawkat December 6, 2023 09:56
Copy link

sonarqubecloud bot commented Dec 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell B 5 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@yawkat yawkat merged commit f875db7 into 4.3.x Dec 6, 2023
@yawkat yawkat deleted the prevrh branch December 6, 2023 11:06
@timyates
Copy link
Contributor

@dstepanov @yawkat this isn't backward compatible

This is in 4.3.x

/**
* Execute this request normally.
*
* @return The response to the request.
* @deprecated Will be removed after 4.3.0
*/
@Deprecated(forRemoval = true, since = "4.3.0")
protected final ExecutionFlow<HttpResponse<?>> normalFlow() {
return normalFlow(request);
}

But on 4.2.x it's got a different return type

/**
* Execute this request normally.
*
* @return The response to the request.
*/
protected final ExecutionFlow<MutableHttpResponse<?>> normalFlow() {
if (!multipartEnabled) {
MediaType contentType = request.getContentType().orElse(null);
if (contentType != null &&
contentType.equals(MediaType.MULTIPART_FORM_DATA_TYPE)) {
if (LOG.isDebugEnabled()) {
LOG.debug("Multipart uploads have been disabled via configuration. Rejected request for URI {}, method {}, and content type {}", request.getUri(),
request.getMethodName(), contentType);
}
return onStatusError(
HttpResponse.status(HttpStatus.UNSUPPORTED_MEDIA_TYPE),
"Content Type [" + contentType + "] not allowed"
);
}
}

Suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants