HttpWebHandlerAdapter#formatRequest is protected
Closes gh-24352
This commit is contained in:
parent
3c0c0c0597
commit
ac8eaca475
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -243,7 +243,13 @@ public class HttpWebHandlerAdapter extends WebHandlerDecorator implements HttpHa
|
||||||
getCodecConfigurer(), getLocaleContextResolver(), this.applicationContext);
|
getCodecConfigurer(), getLocaleContextResolver(), this.applicationContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatRequest(ServerHttpRequest request) {
|
/**
|
||||||
|
* Format the request for logging purposes including HTTP method and URL.
|
||||||
|
* <p>By default this prints the HTTP method, the URL path, and the query.
|
||||||
|
* @param request the request to format
|
||||||
|
* @return the String to display, never empty or @code null}
|
||||||
|
*/
|
||||||
|
protected String formatRequest(ServerHttpRequest request) {
|
||||||
String rawQuery = request.getURI().getRawQuery();
|
String rawQuery = request.getURI().getRawQuery();
|
||||||
String query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
|
String query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
|
||||||
return "HTTP " + request.getMethod() + " \"" + request.getPath() + query + "\"";
|
return "HTTP " + request.getMethod() + " \"" + request.getPath() + query + "\"";
|
||||||
|
|
Loading…
Reference in New Issue