question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ResponseLogger prints raw request on cancellation

See original GitHub issue

On this line of code, we log the result of calling toString on the request: https://github.com/http4s/http4s/blob/a7e2fc108de12f7b111d688d33288c20f6a5a085/server/src/main/scala/org/http4s/server/middleware/ResponseLogger.scala#L70

This is dangerous, as it may end up logging sensitive information, ignoring the logHeaders, logBody, and redactHeadersWhen options.

In our project, we’ve solved this by using Logger.logMessage to log the request in this case, re-using the same options as for responses and introducing a constraint on the request type, A <: Message[F].

However, this may not be a good solution for getting this patched upstream, since it technically breaks the API (introducing a new type constraint), and re-uses the response logging configuration for requests.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rossabakercommented, Jun 10, 2020

Also, much less gravely, while we’re at it, canceled is one l. 😄

0reactions
rossabakercommented, Apr 11, 2021

Fixed by #3488.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging raw HTTP request/response in ASP.NET MVC & IIS7
Definitely use an IHttpModule and implement the BeginRequest and EndRequest events. All of the "raw" data is present between HttpRequest and HttpResponse ...
Read more >
Cancel printing - Microsoft Support
Click Document > Cancel. Click Yes to confirm that you want to cancel the print job. Wait for the print job to disappear...
Read more >
Printing Raw HTTP Requests / Responses in C# - Jordan Brown
When debugging web services in .NET, I have an occasional need to print raw HTTP requests and responses. Tools like Fiddler are very...
Read more >
Cancelling Lending Requests - Atlas Systems
Cancelling Lending Requests. Print Friendly and PDF ... On the Lending request form, click Cancel Request. The Reason for Cancellation box ...
Read more >
How to Log Raw REST Request | Support Center
How do you log the Raw Request that Pega is sending for a Connect-REST POST: Not just the JSON and not the other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found