Edgewall Software

Ticket #4739 (closed defect: duplicate)

Opened 23 months ago

Last modified 23 months 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:

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

follow-up: ↓ 2   Changed 23 months ago by anonymous

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

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 23 months ago by mgood

  • status changed from new to closed
  • resolution set to duplicate

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.

in reply to: ↑ 2   Changed 23 months 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 ;)

Add/Change #4739 (Ticket already modified responds with an Internal Sever Error)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.