Skip to content

Conversation

@hmpf
Copy link
Contributor

@hmpf hmpf commented Oct 29, 2025

Scope and purpose

Make it easy to dump the contents of a view's HttpRequest to a logger.

This is useful for debugging http headers both in development and production, as the headers sent to Django are cleaned up and renamed before being made available to a view. Some webservers and proxies also tweak the headers.

Useful for debugging REMOTE_USER problems...

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If it's not obvious from a linked issue, described how to interact with NAV in order for a reviewer to observe the effects of this change first-hand (commands, URLs, UI interactions)
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

@hmpf hmpf requested a review from a team October 29, 2025 12:33
@hmpf hmpf self-assigned this Oct 29, 2025
@hmpf hmpf added the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Oct 29, 2025
@github-actions
Copy link

github-actions bot commented Oct 29, 2025

Test results

    27 files      27 suites   46m 7s ⏱️
 2 721 tests  2 721 ✅ 0 💤 0 ❌
20 158 runs  20 158 ✅ 0 💤 0 ❌

Results for commit aa01abc.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.02%. Comparing base (5db2915) to head (aa01abc).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3636      +/-   ##
==========================================
+ Coverage   63.00%   63.02%   +0.01%     
==========================================
  Files         612      612              
  Lines       45213    45226      +13     
  Branches       43       43              
==========================================
+ Hits        28487    28503      +16     
+ Misses      16716    16713       -3     
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hmpf hmpf requested a review from lunkwill42 October 30, 2025 12:32
@sonarqubecloud
Copy link

@hmpf hmpf force-pushed the debug-helper branch 2 times, most recently from 1987828 to 1c1c4b4 Compare December 8, 2025 14:21
@hmpf hmpf requested a review from johannaengland December 8, 2025 14:33
Make it easy to dump the contents of a view's HttpRequest to a logger.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

@hmpf hmpf merged commit cf1861e into master Dec 9, 2025
20 checks passed
@hmpf hmpf deleted the debug-helper branch December 9, 2025 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants