Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorrect HTTP status in log files with devise 4.4.1 #4896

Closed
FX-HAO opened this issue Jun 28, 2018 · 4 comments
Closed

Incorrect HTTP status in log files with devise 4.4.1 #4896

FX-HAO opened this issue Jun 28, 2018 · 4 comments

Comments

@FX-HAO
Copy link

FX-HAO commented Jun 28, 2018

Environment

  • Ruby [2.4.1]
  • Rails [5.1.4]
  • Devise [4.4.1]

Current behavior

I upgraded my gems several weeks ago. I just typed bundle upgrade unconsciously. Then I found that when I raised an uncaught error, Completed 401 Unauthorized appeared in log files, it should be Completed 500 Internal Server Error. But the HTTP status client received is the correct 500 Internal Server Error. I downgraded the gems one by one. Finally I found that when I downgraded devise to the original 4.3.0, the problem goes away. And when I upgraded it to 4.4.1, the problem appeared.

Expected behavior

Instead of Completed 401 Unauthorized, it should be Completed 500 Internal Server Error in log files when errors occur.

@FX-HAO
Copy link
Author

FX-HAO commented Jun 29, 2018

And I can reproduce the problem in a new Rails program.

@feliperenan
Copy link
Collaborator

Could you please provide us a sample application that reproduces the issue in isolation?

That would help us find the issue.

@FX-HAO
Copy link
Author

FX-HAO commented Jul 16, 2018

@feliperenan I created a new program, which only includes devise 4.4.1.

git clone git@github.com:FX-HAO/devise_demo.git
cd devise_demo
bundle install && bin/rails server

Then run curl 127.0.0.1:3000, you will see Completed 401 Unauthorized in the console.
It's a serious bug.

@tegon
Copy link
Member

tegon commented Jul 31, 2018

@FX-HAO This was broken in #4375, but it was reversed in 4.4.2.
If you update it's going to work.

@tegon tegon closed this as completed Jul 31, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Development

No branches or pull requests

3 participants