Skip to content

Commit

Permalink
HttpWebHandlerAdapter#formatRequest is protected
Browse files Browse the repository at this point in the history
Closes gh-24352
  • Loading branch information
rstoyanchev committed Jan 16, 2020
1 parent 3c0c0c0 commit ac8eaca
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -243,7 +243,13 @@ protected ServerWebExchange createExchange(ServerHttpRequest request, ServerHttp
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 query = StringUtils.hasText(rawQuery) ? "?" + rawQuery : "";
return "HTTP " + request.getMethod() + " \"" + request.getPath() + query + "\"";
Expand Down

0 comments on commit ac8eaca

Please sign in to comment.