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

Search with limit does not give required response with new webdav - follow up on tests #4017

Closed
SagarGi opened this issue Jun 23, 2022 · 2 comments · Fixed by #4094
Closed
Assignees
Labels
Category:Enhancement Add new functionality QA:team

Comments

@SagarGi
Copy link
Member

SagarGi commented Jun 23, 2022

Describe the bug

When requesting a search with limit using new webdav, ocis does not limit the search in the response instead gives all the search related to the search pattern.

Steps to reproduce

Steps to reproduce the behavior:

  1. create user u11
  2. create/upload file upload.txt
  3. create/upload folder upload

Curl command for empty pattern search with new webdav

curl -X REPORT -vk -u u11:123456 https://host.docker.internal:9200/remote.php/dav/files/u11/ -d '<?xml version="1.0" encoding="UTF-8"?>
<oc:search-files
    xmlns:a="DAV:"
    xmlns:oc="http://owncloud.org/ns">
    <oc:search>
        <oc:pattern>upload</oc:pattern><oc:limit>1</oc:limit>
    </oc:search>
</oc:search-files>'

Expected behavior

oc10 response
<?xml version="1.0"?>
<d:multistatus
	xmlns:d="DAV:"
	xmlns:s="http://sabredav.org/ns"
	xmlns:oc="http://owncloud.org/ns">
	<d:response>
		<d:href>/federated/remote.php/dav/files/u11/upload</d:href>
		<d:propstat>
			<d:prop>
				<d:getlastmodified>Thu, 23 Jun 2022 06:11:00 GMT</d:getlastmodified>
				<d:resourcetype>
					<d:collection/>
				</d:resourcetype>
				<d:quota-used-bytes>0</d:quota-used-bytes>
				<d:quota-available-bytes>-3</d:quota-available-bytes>
				<d:getetag>&quot;62b403f45980b&quot;</d:getetag>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
</d:multistatus>

Actual behavior

OCIS gives all the response related to search pattern and does not limit the search.

OCIS response
<d:multistatus
	xmlns:s="http://sabredav.org/ns"
	xmlns:d="DAV:"
	xmlns:oc="http://owncloud.org/ns">
	<d:response>
		<d:href>/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$83693a6d-9e58-44ce-b32d-fbd8ba07c423%2183693a6d-9e58-44ce-b32d-fbd8ba07c423/upload.txt</d:href>
		<d:propstat>
			<d:prop>
				<oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157$83693a6d-9e58-44ce-b32d-fbd8ba07c423!6e09aa26-ca84-483c-88bd-7a0ffe260343</oc:fileid>
				<d:getetag></d:getetag>
				<d:getlastmodified>2022-06-23T06:24:45Z</d:getlastmodified>
				<d:getcontenttype>text/plain</d:getcontenttype>
				<d:resourcetype></d:resourcetype>
				<d:getcontentlength>5</d:getcontentlength>
				<oc:score>0</oc:score>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
	<d:response>
		<d:href>/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$83693a6d-9e58-44ce-b32d-fbd8ba07c423%2183693a6d-9e58-44ce-b32d-fbd8ba07c423/upload</d:href>
		<d:propstat>
			<d:prop>
				<oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157$83693a6d-9e58-44ce-b32d-fbd8ba07c423!a05482a6-da59-4b4b-8421-fd019ce7bd17</oc:fileid>* Connection #0 to host host.docker.internal left intact

				<d:getetag></d:getetag>
				<d:getlastmodified>2022-06-23T06:24:52Z</d:getlastmodified>
				<d:getcontenttype>httpd/unix-directory</d:getcontenttype>
				<d:resourcetype>
					<d:collection/>
				</d:resourcetype>
				<oc:size>0</oc:size>
				<oc:score>0</oc:score>
			</d:prop>
			<d:status>HTTP/1.1 200 OK</d:status>
		</d:propstat>
	</d:response>
</d:multistatus>

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

OCIS= latest docker pull

Additional context

Add any other context about the problem here.

@micbar micbar added Category:Enhancement Add new functionality and removed Type:Bug labels Jul 4, 2022
@aduffeck aduffeck mentioned this issue Jul 5, 2022
@SwikritiT
Copy link
Contributor

SwikritiT commented Jul 8, 2022

Still some tests linked to expected to fail needs investigation on why it's still failing

### [Search with limit does not give required response with new webdav](https://github.com/owncloud/ocis/issues/4017)
- [apiWebdavOperations/search.feature:127](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L127)
- [apiWebdavOperations/search.feature:151](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavOperations/search.feature#L151)

TODO QA Team:

@SwikritiT SwikritiT reopened this Jul 8, 2022
@SwikritiT SwikritiT changed the title Search with limit does not give required response with new webdav Search with limit does not give required response with new webdav - follow up on tests Jul 8, 2022
@SagarGi SagarGi self-assigned this Jul 18, 2022
@SagarGi
Copy link
Member Author

SagarGi commented Jul 20, 2022

This expected to failure has been updated after the fix in this issue. So closing it.

@SagarGi SagarGi closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality QA:team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants