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

Bug/decoding uri #3187

Merged
merged 4 commits into from
Dec 10, 2019
Merged

Bug/decoding uri #3187

merged 4 commits into from
Dec 10, 2019

Conversation

AleksandrukTad
Copy link
Contributor

@AleksandrukTad AleksandrukTad commented Oct 22, 2019

Hey its my first pr to open source project, let me know if I have to do some additional stuff.
Was not able to test it with actual files, but now if you go to 0.0.0.0:4500/test test.txt fsPath will be with space not %20.

Fixes #3164

@CLAassistant
Copy link

CLAassistant commented Oct 22, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

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

Hi, there are a few more things...

@AleksandrukTad
Copy link
Contributor Author

Hey, I updated description remove ds_store. Unfortunately i do not know how to test this :/ Do you have like a crash course on the testing library that you are using?

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

There still seems to be a //cli/.DS_Store file. Please remove this file.

Currently there is no tutorial on how to do testing. Please look at the files ending in _test.ts to see how tests should look.

@AleksandrukTad
Copy link
Contributor Author

AleksandrukTad commented Oct 29, 2019

So my idea to do this test is:

Create file with the space for example "test test.txt",
run the server
try to get the file go to localhost:port/test%20test.txt
expect status code 200.
Remove the file.

What do you think is this the right approach?

@bartlomieju
Copy link
Member

So my idea to do this test is:

Create file with the space for example "test test.txt",
run the server
try to get the file go to localhost:port/test%20test.txt
expect status code 200.
Remove the file.

What do you think is this the right approach?

No need to create and remove the file, just put it into std/http/testdata directory and leave it there. Otherwise sounds good 👍

@AleksandrukTad
Copy link
Contributor Author

AleksandrukTad commented Oct 29, 2019

Hey I have done the unit test for this change, but since I pulled latest upstream is failing on sccache :/
It building and testing fine on local.

@zekth
Copy link
Contributor

zekth commented Nov 7, 2019

There still seems to be a //cli/.DS_Store file. Please remove this file.

We need to add this in the gitignore

await startFileServer();
try {
const res = await fetch(
"http:https://localhost:4500/std/http/testdata/test%20file.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

should be changed to http:https://localhost:4500/http/testdata/test%20file.txt

@zekth zekth mentioned this pull request Dec 2, 2019
@AleksandrukTad
Copy link
Contributor Author

@bartlomieju It seems like some conflicts have to be resolved. Can you please do it whenever you have a moment? Cheers

@nayeemrmn
Copy link
Collaborator

@AleksandrukTad You forgot to run git submodule update before your last commit. You'll need to cd into those submodules and checkout the commit that master has them on and then commit that.

@AleksandrukTad
Copy link
Contributor Author

AleksandrukTad commented Dec 9, 2019

@nayeemrmn git submodule does not do anything if I cd into "third_party" :/. These are my conflicts:
`
diff --git a/deno_typescript/typescript b/deno_typescript/typescript
index 7cf6c70d..26655db1 160000
--- a/deno_typescript/typescript
+++ b/deno_typescript/typescript
@@ -1 +1 @@
-Subproject commit 7cf6c70d90b60e962db417d80290288eb786b5fd
+Subproject commit 26655db1dd04d93217002ac87f950aba812c53eb
diff --git a/std/http/file_server_test.ts b/std/http/file_server_test.ts
index 8fa8c357..fb2aea61 100644
--- a/std/http/file_server_test.ts
+++ b/std/http/file_server_test.ts
@@ -88,7 +88,7 @@ test(async function serveFallback(): Promise {
await startFileServer();
try {
const res = await fetch(

  •  "http:https://localhost:4500/std/http/testdata/test%20file.txt"
    
  •  "http:https://localhost:4500/http/testdata/test%20file.txt"
    
    );
    assert(res.headers.has("access-control-allow-origin"));
    assert(res.headers.has("access-control-allow-headers"));
    diff --git a/third_party b/third_party
    index 8132faa9..3be244fe 160000
    --- a/third_party
    +++ b/third_party
    @@ -1 +1 @@
    -Subproject commit 8132faa910c498d4b52cb87fe7141058445a60b3
    +Subproject commit 3be244fe9064e57cb106d6a270662a27e76a7223
    `

@nayeemrmn
Copy link
Collaborator

@nayeemrmn git submodule does not do anything if I cd into "third_party" :/.

That's not what I said to do 😅. Okay try this instead: git reset HEAD~, git submodule update and then redo your last commit.

@zhmushan
Copy link
Contributor

zhmushan commented Dec 9, 2019

Following may be useful to you:

git remote add upstream https://github.com/denoland/deno
git fetch upstream
git rebase upstream/master
git push origin master -f

@AleksandrukTad
Copy link
Contributor Author

@nayeemrmn Sorry I must have missundertood then. My git knowledge is pretty basic add/commit/push/pull/rebase. You solution worked thanks!

@AleksandrukTad
Copy link
Contributor Author

@nayeemrmn @zhmushan any idea why this is failing tests only on windows?

@lucacasonato
Copy link
Member

@AleksandrukTad Just push anything to the branch to return the test. @ry the plugin test seems to be flakey. Had the same issue in my last PR.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - thanks - sorry this took so long to merge

@ry ry merged commit 31ddfd5 into denoland:master Dec 10, 2019
bartlomieju pushed a commit to bartlomieju/deno that referenced this pull request Dec 28, 2019
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
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.

[std] File server example can not handle url encoded characters
8 participants