Post Single Message - Incorrect location header

Bug #1194571 reported by Malini Kamalambal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
High
Kurt Griffiths

Bug Description

Summary : The location header returned is incorrect, when a single message is inserted (NOTE : The location header has the correct value, when more than one message is inserted)

Steps to Repro:
Post message to a queue, with a single message in the request body

Expected Result:
Location header will return the correct value

eg:
Location →/v1/queues/darngoodqueue/messages?51c9cd53821e7250f344eee1

Actual Result:

Location header is returned without 'messages' in the url.
i.e. Location → /v1/queues/darngoodqueue/51c9ce28821e7250f344eee2

Revision history for this message
Kurt Griffiths (kgriffs) wrote :

So, this is indeed an inconsistency that was done by design, but I would like to change it to always use the bulk schema. This report also uncovered a bug in the HTTP routes that I would like to fix:

/v1/queues/darngoodqueue?ids= 51c9cd53821e7250f344eee1

Should be, instead:

/v1/queues/darngoodqueue/messages?ids= 51c9cd53821e7250f344eee1

Changed in marconi:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Kurt Griffiths (kgriffs)
milestone: none → havana-2
Changed in marconi:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/36319
Committed: http://github.com/stackforge/marconi/commit/4dfa19d403d506fe5a199577f582005419d1a5d9
Submitter: Jenkins
Branch: master

commit 4dfa19d403d506fe5a199577f582005419d1a5d9
Author: kgriffs <email address hidden>
Date: Thu Jun 27 10:54:31 2013 -0500

    Fix route for bulk-get message by ID

    This patch includes the following changes:

    * /v1/queues/my-queue?ids=1,2,3 => /v1/queues/my-queue/messages?id=1,2,3
    * Update Location header to suite
    * Always return the same schema for location header, regardless of the
      number of messages POSTed.

    Change-Id: I4559222e8f4685af1020c2743c26de699aef30dd
    Fixes: bug #1194571
    Fixes: bug #1165102

Changed in marconi:
status: In Progress → Fix Committed
Changed in marconi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.