Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !11640

Ensure posix compliant joins for urls in middleware

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/psiservices-justin-sullard/main into main Nov 10, 2021
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: psiservices-justin-sullard

This avoids issues encountered on non-posix compliant systems.

The issue was first identified from a Windows system attempting to utilize noopServiceWorkerMiddleware. The platform-specific separator implemented by path.join would render a mismatch in any non-empty path provided and thus would not result in the service-worker.js file being provided through the middleware.

Further investigation of the react-dev-utils found a similar scenario in redirectServedPathMiddleware. Both path.join calls were adjusted to path.posix.join to ensure that posix compliance is preserved in urls for both of these middleware, in their comparison or redirection.

At present there are several open issues which may be impacted by this pull request. If needed I can do sufficient investigation to compile a list of the most likely candidates directly.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/psiservices-justin-sullard/main