Edgewall Software
Modify

Ticket #4739 (closed defect: duplicate)

Opened 5 years ago

Last modified 5 years ago

Ticket already modified responds with an Internal Sever Error

Reported by: nslater@… Owned by: jonas
Priority: low Milestone:
Component: general Version:
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description

If you try to modify a ticket that has been changed while you were editing you get the following response from Trac:

500 Internal Server Error (Sorry, can not save your changes. This ticket has been modified by someone else since you started)

rfc2616 states that a 500 error is:

The server encountered an unexpected condition which prevented it from fulfilling the request.

The idea of resources being editing simultaneously is an expected aspect of network available applications such as Trac.

Trac should not return a HTTP 500 response for expected behaviour.

NOTE: This probably applies to other areas of Trac.

Attachments

Change History

comment:1 follow-up: Changed 5 years ago by anonymous

Side issue: Why does the rfc2616 link to a changeset?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 5 years ago by mgood

  • Resolution set to duplicate
  • Status changed from new to closed

Reviewing the HTTP codes it appears that "409 Conflict" would suit this situation. #4100 is already open for addressing editing conflicts, so I'll add a note about this there.

Replying to anonymous:

Side issue: Why does the rfc2616 link to a changeset?

Because Trac considers an r followed by hex digits to refer to a revision #. Hex digits are recognized in order to support distributed VC systems that use hex hashes instead of numeric identifiers.

comment:3 in reply to: ↑ 2 Changed 5 years ago by cboos

Replying to mgood:

Reviewing the HTTP codes it appears that "409 Conflict" would suit this situation. #4100 is already open for addressing editing conflicts, so I'll add a note about this there.

Replying to anonymous:

Side issue: Why does the rfc2616 link to a changeset?

Because Trac considers an r followed by hex digits to refer to a revision #.

... but I already hit that common pattern, and the trunk is slightly better than 0.10-stable in this respect:

0.10-stable:

    CHANGESET_ID = r"(?:\d+|[a-fA-F\d]{6,})" # only "long enough" hexa ids

trunk:

    CHANGESET_ID = r"(?:\d+|[a-fA-F\d]{8,})" # only "long enough" hexa ids

I couldn't come up with a common text pattern that would be matched by the latter, which of course doesn't mean there aren't ;)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.