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

fix: Encode fileServerFolder to fix #25839 #29162

Merged
merged 30 commits into from
May 21, 2024

Conversation

Zzet-Z
Copy link
Contributor

@Zzet-Z Zzet-Z commented Mar 17, 2024

Additional details

When there are invalid header characters in a test folder path (such as Chinese characters), setting the x-cypress-file-path header fails. This PR will encode the file path header value to solve the issue and decode it in server-base.ts.

Steps to test

  • Create a project that is under a folder that contains character not allowed in a header.
  • Run a test that cy.visits a file served from the local file server
  • Verify the visit succeeds

How has the user experience changed?

The Invalid character in header content ["x- cypress-file-path"] error is no longer thrown.

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@Zzet-Z Zzet-Z marked this pull request as ready for review March 17, 2024 02:49
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Could you add a test around this behavior? We'll need a test in order to merge the fix.

@Zzet-Z
Copy link
Contributor Author

Zzet-Z commented Mar 20, 2024

@jennifer-shehane
i'd be happy to do that,and I added a new unit test case, but since this issue will only occur in Ubuntu, I just can write a passing case. Is this okay?

@Zzet-Z Zzet-Z removed their assignment Mar 29, 2024
@Zzet-Z
Copy link
Contributor Author

Zzet-Z commented Mar 29, 2024

@jennifer-shehane Thanks for your review!
Sorry,I hit the Unassign button by mistake😖.
This is my first time making an open source contribution. I have checked many related documents on GitHub, but I am still a little confused about the current process. Is there anything else that I need to deal with now? Looking forward to your help.

@jennifer-shehane jennifer-shehane dismissed their stale review April 17, 2024 14:24

Dismissing previous review around added test

@Zzet-Z
Copy link
Contributor Author

Zzet-Z commented Apr 18, 2024

@jennifer-shehane I'm a bit confused right now, sorry. Is there anything else need me to do, or just wait for you to verify and initiate the merge?

@jennifer-shehane
Copy link
Member

@Zzet-Z Just waiting til next sprint to see if I can assign some more eyes to review this.

@Zzet-Z
Copy link
Contributor Author

Zzet-Z commented Apr 19, 2024

@Zzet-Z Just waiting til next sprint to see if I can assign some more eyes to review this.

OK thx!

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zzet-Z
Copy link
Contributor Author

Zzet-Z commented Apr 24, 2024

@Zzet-Z There appear to be some failing tests with this change: https://app.circleci.com/pipelines/github/cypress-io/cypress/61086/workflows/6745104d-7a56-4c94-a750-d7c5a415b06e/jobs/2539954

@jennifer-shehane Oh, that's a problem, and I found some other problems and dealt with them. The local operation passed these tests. Could you please help me run the integration test again if it is convenient.

@jennifer-shehane
Copy link
Member

@Zzet-Z Running them now

@Zzet-Z
Copy link
Contributor Author

Zzet-Z commented Apr 25, 2024

@jennifer-shehane Oops,I neglected a test case, now it is updated, please help run it again when you are free.By the way, there are still a small part of failures that seem not to be caused by my changes, could you please help me check whether these need my attention, thx!

@jennifer-shehane jennifer-shehane dismissed their stale review April 25, 2024 17:32

Dismissing my previous review to open up reviews for the team

cli/CHANGELOG.md Outdated Show resolved Hide resolved
@jennifer-shehane jennifer-shehane merged commit 3a3d877 into cypress-io:develop May 21, 2024
67 checks passed
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 21, 2024

Released in 13.10.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.10.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ERR_INVALID_CHAR]: Invalid character in header content ["x-cypress-file-path"]
5 participants