Return content-type from saved request
This commit is contained in:
committed by
Josh Cummings
parent
30d016bcbd
commit
07f737b989
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user