Skip to content

Skip accessing request.user if the session is empty - #839

Open
gvangool wants to merge 2 commits into
jazzband:masterfrom
gvangool:fix/accessing-empty-session
Open

Skip accessing request.user if the session is empty#839
gvangool wants to merge 2 commits into
jazzband:masterfrom
gvangool:fix/accessing-empty-session

Conversation

@gvangool

@gvangool gvangool commented Jul 28, 2026

Copy link
Copy Markdown

Accessing request.user would automatically mark the current session as accessed and set a Vary: Cookie header on the response. This happens even when request.user is the anonymous user.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.34%. Comparing base (da85ac4) to head (85775ed).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #839   +/-   ##
=======================================
  Coverage   96.33%   96.34%           
=======================================
  Files          35       35           
  Lines        1256     1259    +3     
=======================================
+ Hits         1210     1213    +3     
  Misses         46       46           

☔ View full report in Codecov by Harness.
📢 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.

gvangool added 2 commits July 28, 2026 12:57
Accessing `request.user` would automatically mark the current session as
accessed and set a `Vary: Cookie` header on the response. This happens
*even* when `request.user` is empty.
@gvangool
gvangool force-pushed the fix/accessing-empty-session branch from dd15c39 to 6f2a46e Compare July 28, 2026 19:58
@gvangool gvangool changed the title Skip accessing request.user if no session Skip accessing request.user if the session is empty Jul 28, 2026
@gvangool
gvangool force-pushed the fix/accessing-empty-session branch from 6f2a46e to 85775ed Compare July 28, 2026 20:03
@gvangool
gvangool marked this pull request as ready for review July 28, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant