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: Normalize location path to avoid multiple forward slashes & fix docs #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dav-pascual
Copy link
Collaborator

@dav-pascual dav-pascual commented Feb 27, 2023

Fixes: #88 and docs

Copy link
Collaborator

@dekobon dekobon left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! The integration tests are failing with the new changes. Can you please modify the integration tests such that they test for the new functionality?

@dekobon
Copy link
Collaborator

dekobon commented Mar 3, 2023

I've been doing some research on how to fix the integration tests and I've been unable to find a method of normalizing slashes using rewrite rules that will preserve the requested schema, hostname, and port. I think we may have to implement this in njs. I did a prototype in njs and it was relatively simple to normalize the uri requested to S3, but it does not result in a HTTP 302 redirect to the client. I'll update as I discover more.

@dav-pascual
Copy link
Collaborator Author

I have not taken a a look yet at the integration tests yet, but if the njs solution serves the content correctly even if it doesn't rewrite the URL / redirect in the client I think that's a valid solution.

In a previous unsuccessful attempt in njs I was getting 404 errors after normalising "uri_path" variable.

@dav-pascual dav-pascual force-pushed the master branch 10 times, most recently from 0cd76e7 to e6f9460 Compare March 6, 2023 21:35
@dav-pascual
Copy link
Collaborator Author

I tried updating the integration tests to expect a 302 code redirect when there is a double slash, but I am getting a error code return 7 from the run, without much detail

@dekobon
Copy link
Collaborator

dekobon commented Mar 8, 2023

@dav-pascual - I'm traveling right now, so it will be a while until I can engage on this.

Copy link

@violethaze74 violethaze74 left a comment

Choose a reason for hiding this comment

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

reviewed

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.

Remove double/multiple forward slashes from the request path
3 participants