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

Properly set the status text in the ocs response for v2 calls #28570

Merged
merged 1 commit into from
Aug 7, 2017

Conversation

DeepDiver1975
Copy link
Member

@DeepDiver1975 DeepDiver1975 commented Aug 2, 2017

Description

For OCS v2 calls the status text for status 200 has to be 'ok' not failure

Related Issue

fixes owncloud/notifications#103

How Has This Been Tested?

Observe OCS responses in the notifications app

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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.

@DeepDiver1975 DeepDiver1975 force-pushed the fix-ocs-status-text-in-v2-using-ocscontroller branch from 6d2217b to 6acdf9b Compare August 3, 2017 12:29
@@ -191,7 +191,7 @@ public function testStatusCodeMapping() {
$this->createMock(ISecureRandom::class),
$configMock
));
$expected = '{"ocs":{"meta":{"status":"failure","statuscode":200,"message":"OK",' .
Copy link
Contributor

Choose a reason for hiding this comment

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

heh even the test had this crazyness? :)

Copy link
Contributor

@guruz guruz left a comment

Choose a reason for hiding this comment

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

i haven't tested the PR.
code looks ok (i'm assuming 'failure' is some default string that needs to be overwriten)

@PVince81
Copy link
Contributor

PVince81 commented Aug 3, 2017

Looks slightly risky. If this is a regression, what introduced it and when ?

@DeepDiver1975
Copy link
Member Author

Looks slightly risky. If this is a regression, what introduced it and when ?

This regression was introduced with the move-ocs-to-appframework change. It exists since the very first day.

But we can also ignore this - nobody with a reasonable client should evaluate that status string

@PVince81
Copy link
Contributor

PVince81 commented Aug 4, 2017

Thanks for the explanation. I agree to merge this then.

@PVince81 PVince81 merged commit 050d84d into master Aug 7, 2017
@PVince81 PVince81 deleted the fix-ocs-status-text-in-v2-using-ocscontroller branch August 7, 2017 08:00
@PVince81
Copy link
Contributor

PVince81 commented Aug 7, 2017

@DeepDiver1975 please backport to stable10.

Backport further if older versions are affected too.

@lock
Copy link

lock bot commented Aug 2, 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 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After creating a notification using announcementcenter I can't list notifications anymore
4 participants