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 spaces great again #171

Merged
merged 1 commit into from
Jul 23, 2019
Merged

Conversation

Steveb-p
Copy link
Contributor

Fixes #170

@ankitpokhrel
Copy link
Owner

@Steveb-p thanks for the PR, can we also make the test great again 😄 : https://github.com/ankitpokhrel/tus-php/blob/master/tests/RequestTest.php#L147-L158

@Steveb-p
Copy link
Contributor Author

@ankitpokhrel Adjusted. Now with 100% crispy tests.

Other approach to testing filenames might be using pathinfo function to check it.

[steveb@xxx tus-php]$ php -r "var_dump(pathinfo('#test test2x.php'));"
array(4) {
  ["dirname"]=>
  string(1) "."
  ["basename"]=>
  string(16) "#test test2x.php"
  ["extension"]=>
  string(3) "php"
  ["filename"]=>
  string(12) "#test test2x"
}
[steveb@xxx tus-php]$ php -r "var_dump(pathinfo('../../#test test2x.php'));"
array(4) {
  ["dirname"]=>
  string(5) "../.."
  ["basename"]=>
  string(16) "#test test2x.php"
  ["extension"]=>
  string(3) "php"
  ["filename"]=>
  string(12) "#test test2x"
}

@ankitpokhrel
Copy link
Owner

@Steveb-p thanks, this should work for now :)

@ankitpokhrel ankitpokhrel merged commit a9c9d95 into ankitpokhrel:master Jul 23, 2019
@Steveb-p Steveb-p deleted the fix-170 branch July 26, 2019 10:26
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.

Spaces in filenames causes 400 bad request
2 participants