Skip to content

Commit

Permalink
Remove percent encoding when logging url path (#2399)
Browse files Browse the repository at this point in the history
## Current behaviour

`[ INFO ] GET /users/auth0%7C59abc/`

## Expected behaviour

`[ INFO ] GET /users/auth0|59abc/`

Co-authored-by: Jari (LotU) <j.koopman@jarict.nl>
  • Loading branch information
valeriomazzeo and MrLotU committed Jun 24, 2020
1 parent 6146347 commit 6810c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Vapor/Responder/DefaultResponder.swift
Expand Up @@ -36,7 +36,7 @@ internal struct DefaultResponder: Responder {

/// See `Responder`
public func respond(to request: Request) -> EventLoopFuture<Response> {
request.logger.info("\(request.method) \(request.url.path)")
request.logger.info("\(request.method) \(request.url.path.removingPercentEncoding ?? request.url.path)")
let startTime = DispatchTime.now().uptimeNanoseconds
let response: EventLoopFuture<Response>
let path: String
Expand Down

0 comments on commit 6810c21

Please sign in to comment.