Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341003 - [sites] Location header returned from POST is wrong
Summary: [sites] Location header returned from POST is wrong
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-25 16:35 EDT by Mark Macdonald CLA
Modified: 2011-09-01 11:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-03-25 16:35:46 EDT
1. POST to /site to create a site, as explained in the API (see [1])
2. The response looks something like:

Content-Type: application/json; charset=UTF-8
Content-Length: 319
Cache-Control: no-cache
Server: Jetty(6.1.x)
Location: http://localhost:8080/site/

{
  "HostingStatus": {"Status": "stopped"},
  "Id": "A",
  "Location": "http://localhost:8080/site/A",
  "Mappings": [
    {
      "Source": "/file.html",
      "Target": "/foo.html"
    },
    {
      "Source": "/web",
      "Target": "http://www.google.com"
    }
  ],
  "Name": "My hosted site",
  "Workspace": "A"
}


Note that the Location: header does not match the Location property in the JSON. The header is wrong.

[1] http://wiki.eclipse.org/Orion/Server_API/Site_Configuration_API#Creating_a_site_configuration