Project

General

Profile

Actions

Defect #8883

closed

Issues Rest API returns HTML instead of xml or json payload

Added by zlatko arifhodzic almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
2011-07-22
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi,

Seems that the issues Rest API is somehow broken in 1.2.1 version.

Hitting the appropriate url on both xml or json entry points returns a HTML page instead of xml or json payload.

Note that the projects API does not have this behavior, as it returns the expected xml or json payload.

Also note that the issue does not seem related to the http front-end as it is reproducible on both rack and apache2/passenger setups.

Steps to reproduce

  • DO : make sure you have a project with some issues, and an API key for the a given user
  • DO : execute :
    curl -X GET http://<myserver>/redmine/issues.json?key=<key>
  • OBSERVE : the log indicates :
Processing IssuesController#index to xml (for ::1 at 2011-07-22 15:18:41) [GET]
  Parameters: {"format"=>"xml", "action"=>"index", "controller"=>"issues", "key"=>"xxxxxxxxxxxxx"}
Rendering issues/index
Completed in 201ms (View: 144, DB: 10) | 200 OK [http://localhost/redmine/issues.xml?key=xxxxxxxxxxxxx]
  • EXPECT : an xml payload is returned
  • OBSERVE : curl returns the "issues search" page part in HTML format :
   <div class="contextual">
   </div>
   <h2>Issues</h2>
   ....

Environment

  • Fresh Redmine 1.2.1 installation from downloaded tarball
  • Rails 2.3.11
  • Ruby 1.8.7
  • MySQL 5.1.49
  • Debian Squeeze

Files

response-before-patched.out (30.9 KB) response-before-patched.out Response to Issues.json listing with 1.2.1 zlatko arifhodzic, 2011-07-25 11:53
response-patched.out (30.9 KB) response-patched.out Response to Issues.json listing with 1.2.1 + r6309 reported zlatko arifhodzic, 2011-07-25 11:53
Actions

Also available in: Atom PDF