Defect #7307

HTTP 500 error on query for empty revision

Added by Etienne Massip almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2011-01-12
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:1.1.1
Resolution:Fixed Affected version:1.1.0

Description

On revision page, you can change the revision id then click on the 'Ok' button to get to the new revision page.

If you remove the revision id field content and leave it blank then you'll get a HTTP 500 error.

Additional question (UX) : why is the 'Ok' button displayed on the revision page and not on the repository page ?

Tested with a SVN repo.

7307-rev-empty.diff Magnifier (581 Bytes) Toshi MARUYAMA, 2011-01-12 11:01


Related issues

Duplicated by Redmine - Defect #7332: Defect #7307 doesn't appear to be fixed Closed 2011-01-14

Associated revisions

Revision 4703
Added by Toshi MARUYAMA almost 7 years ago

scm: fix error on revision page for empty revision (#7307).

Revision 4704
Added by Toshi MARUYAMA almost 7 years ago

scm: mercurial: fix error on revision page for empty revision (#7307).

Revision 4710
Added by Jean-Philippe Lang almost 7 years ago

Respond with 404 instead of 500 when revision/entry is not found in the repository (#7307).

Revision 4712
Added by Toshi MARUYAMA almost 7 years ago

scm: use #blank? instead of #nil? || #empty? at Repository#find_changeset_by_name(name) (#7307).

Referring r4711.

Revision 4713
Added by Toshi MARUYAMA almost 7 years ago

scm: git: fix id at functional test_empty_revision test(#7307).

Revision 4714
Added by Toshi MARUYAMA almost 7 years ago

scm: mercurial: fix id at functional test_empty_revision test(#7307).

History

#1 Updated by Toshi MARUYAMA almost 7 years ago

This is ad hoc patch.

#2 Updated by Gloriaer smith almost 7 years ago

  • File leanspawithacai.jpg added
  • Assignee set to Maxim Krušina

#3 Updated by Toshi MARUYAMA almost 7 years ago

  • File deleted (leanspawithacai.jpg)

#4 Updated by Toshi MARUYAMA almost 7 years ago

  • Assignee deleted (Maxim Krušina)

#5 Updated by Toshi MARUYAMA almost 7 years ago

Etienne Massip wrote:

Additional question (UX) : why is the 'Ok' button displayed on the revision page and not on the repository page ?

Git shows branches and tags list box.
https://projects.kde.org/projects/extragear/kdevelop/kdevelop/repository

But, I don't know the reason of no 'Ok' button.

#6 Updated by Etienne Massip almost 7 years ago

Toshi MARUYAMA wrote:

This is ad hoc patch.

Do you want me to test it ?

#7 Updated by Toshi MARUYAMA almost 7 years ago

Etienne Massip wrote:

Toshi MARUYAMA wrote:

This is ad hoc patch.

Do you want me to test it ?

I tested in Subversion.
I will research other SCMs.

#8 Updated by Toshi MARUYAMA almost 7 years ago

  • Assignee set to Toshi MARUYAMA

#9 Updated by Toshi MARUYAMA almost 7 years ago

  • Status changed from New to Closed
  • Target version set to 1.1.1
  • Resolution set to Fixed

Fixed in trunk by r4703, r4704 and in 1.1 by r4707.

#10 Updated by Ве Fio almost 7 years ago

Hmm. I'm using 4707 right now, and the issue doesn't seem fixed for me. I click the repository tab, click view all revisions, then in the "Revision: <input box> <ok button>" I just click the ok button without entering anything, and up pops a 500 error.

#11 Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from Closed to Reopened

r4707 will return a 500 status code indeed. Maybe we could simply redirect to the revisions list when no revision parameter is given.

#12 Updated by Etienne Massip almost 7 years ago

I'm running r4709 and I get the same redmine 500 error I would get if I typed in a revision number which would not exist.

I don't have the Internal Server Error HTTP 500 any more (with svn, at least) so, as for myself, this issue is resolved.

#13 Updated by Jean-Philippe Lang almost 7 years ago

Yes, it's a user friendly 500 error but still, it's a 500 error response (meaning Internal Server Error) and this is not really appropriate. I think we should:
  • response with a 404 when the revision that was entered was not found
  • do a redirect to the revision list when no revision parameter is given

#14 Updated by Etienne Massip almost 7 years ago

Jean-Philippe Lang wrote:

Yes, it's a user friendly 500 error but still, it's a 500 error response (meaning Internal Server Error) and this is not really appropriate. I think we should:
  • response with a 404 when the revision that was entered was not found
  • do a redirect to the revision list when no revision parameter is given

Sure, both looks like a (far for 404) better behavior.

#15 Updated by Jean-Philippe Lang almost 7 years ago

500 error changed to 404 in r4711.

#16 Updated by Toshi MARUYAMA almost 7 years ago

  • Status changed from Reopened to Closed

Fixed in trunk by from r4712 to r4714 and in 1.1 by from r4715 to r4717.

Also available in: Atom PDF