Return content-type from saved request

This commit is contained in:
Jonas Bamberger
2023-06-30 11:47:11 +02:00
committed by Josh Cummings
parent 30d016bcbd
commit 07f737b989
2 changed files with 16 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.http.HttpHeaders;
/**
* Provides request parameters, headers and cookies from either an original request or a
@@ -141,6 +142,11 @@ class SavedRequestAwareWrapper extends HttpServletRequestWrapper {
return this.savedRequest.getMethod();
}
@Override
public String getContentType() {
return getHeader(HttpHeaders.CONTENT_TYPE);
}
/**
* If the parameter is available from the wrapped request then the request has been
* forwarded/included to a URL with parameters, either supplementing or overriding the