Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MockHttpServletRequest.getRequestDispatcher to consider context path #6292

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

volodymyr-korzh
Copy link
Collaborator

Changes required for HtmlUnitMockHttpServletRequest to consider context path for org.springframework.mock.web.MockHttpServletRequest#getRequestDispatcher method.

As org.springframework.mock.web.MockHttpServletRequest#getRequestDispatcher has no consideration of context path, but jetty ServletContextApi is actually considering context path for getRequestDispatcher method, it is required to align mock behaviour for tests.

See:

  • org.eclipse.jetty.ee10.servlet.ServletContextHandler.ServletContextApi#getRequestDispatcher
  • org.springframework.mock.web.MockHttpServletRequest#getRequestDispatcher

Copy link

Formatting check succeeded!

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.59%. Comparing base (406db33) to head (abb50a5).
Report is 38 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6292      +/-   ##
============================================
+ Coverage     83.54%   83.59%   +0.05%     
- Complexity    27432    27563     +131     
============================================
  Files          1707     1715       +8     
  Lines        106185   106674     +489     
  Branches      13397    13434      +37     
============================================
+ Hits          88710    89173     +463     
+ Misses        11750    11741       -9     
- Partials       5725     5760      +35     

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

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