Skip to content

Conversation

@SergioBertolinSG
Copy link
Contributor

@SergioBertolinSG SergioBertolinSG commented Sep 27, 2016

Description

Refactor of webdav trait to be more readable and clear.
Use of initial slash '/' as standard way for dealing with files and folders in gherkin.

Motivation and Context

There is confusion about how the code works.
#26098 (comment)

How Has This Been Tested?

Running tests locally.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mention-bot
Copy link

@SergioBertolinSG, thanks for your PR! By analyzing the annotation information on this pull request, we identified @PVince81, @rullzer and @DeepDiver1975 to be potential reviewers

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

Looks good to me, up to you if you want to act on my comments. 👍

} else {
return $this->davPath . '/files/' . $user . '/';
}
}*/
Copy link
Contributor

Choose a reason for hiding this comment

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

remove commented out code ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

$fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path";
public function makeDavRequest($user, $method, $path, $headers, $body = null, $type = "files"){
if ( $type === "files" ){
echo "user: " . $user . " method: " . $method . " path: " . $path . " type: " . $type;
Copy link
Contributor

Choose a reason for hiding this comment

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

did you use echo just for debugging ? maybe remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Given using new dav path
And As an "admin"
When Downloading file "welcome.txt"
When Downloading file "/welcome.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we really need to enforce that, unless we want this level of precision.
In PHP it's easy to force add a slash without double by doing something like '/' . ltrim($path, '/')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to have it consistent and use slash before always, having it different is confusing.

@PVince81
Copy link
Contributor

PVince81 commented Oct 4, 2016

Looks good, merging

@PVince81 PVince81 merged commit 5827731 into master Oct 4, 2016
@PVince81 PVince81 deleted the integration-tests-refactoring branch October 4, 2016 13:50
@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
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.

4 participants