Needs work
Project:
Drupal core
Version:
main
Component:
user system
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Sep 2020 at 12:01 UTC
Updated:
29 Jun 2024 at 00:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
naresh_bavaskarComment #3
naresh_bavaskarPlease review
Comment #5
anmolgoyal74 commentedresponse HTTP code should be 204 for logout request.
Comment #6
ayushmishra206 commentedComment #7
ayushmishra206 commentedComment #8
naresh_bavaskar#6 patch was making logout response to
204 No contentbut the the purpose this issue was to have the content with any msg on logout response.Please review the updated patch phpunit testcases updation.
Comment #9
samiullah commentedFor login route I m getting {"message":"Not acceptable format: json"}
Are there any detailed steps to test this one
Comment #12
vikashsoni commented@naresh_bavaskar apply #8 patch working fine now getting response when logged out in rest api " Logged out successfully " sharing screenshot ....
Comment #14
kristen polThanks @vikashsoni for testing the patch. In the future, you don't need to include a screenshot of applying the patch. Also, you can embed your screenshots within your comment so it's easier for others to see the results.
I have read a bit about whether or not
200or204should be returned and found this helpful: https://itqna.net/questions/3533/what-http-verb-i-use-logoutSo, if I'm understanding correctly, it seems the
204was indeed correct when no message was included, but should be changed to200with the message added.That said, I'm concerned that changing the function signature of
logoutwon't be allowed without handling backwards-compatibility.Comment #17
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #19
d34dman commented> So, if I'm understanding correctly, it seems the 204 was indeed correct when no message was included, but should be changed to 200 with the message added.
@Kristen Pol, Thanks for clearing this up. The documentation over here does mention that it is a 204 https://www.drupal.org/docs/8/core/modules/rest/javascript-and-drupal-8-....
However, the change record over here https://www.drupal.org/node/2720655 could be miss-leading, as that is what is causing confusion.
EDIT:
miss-leading part being, it says the response for logout -- gives "Logged out!". It also doesn't mention that it would be a 204, instead of 200.