Okay, this came up this afternoon while working with Shawn's handy Net::Jifty utility. Basically, when you perform a PUT request to modify a record, REST response to a successful modification by setting a "Location" header that points back to the URL for viewing the resource. This doesn't precisely make sense, at least not after reading and rereading RFC 2616 on HTTP/1.1 and it doesn't seem to get consistent handling.
<br><br>When I run the standalone Jifty server, for example, this gets treated as a 200 response with the header "Location: /=/model/SomeModel/id/123" set. This is fine, other than being a violation of the absolute URL requirement here, but it's pretty widely understood how relative URLs should be handled here. However, when I run it under FastCGI (actually fcgid) on Apache, the response is altered into a 302 response with the "Location" header.
<br><br>After reading the HTTP spec carefully, I think the ideal handling would be as follows:<br><br>On Create:<br><br>201 Created<br>Location: /=/model/SomeModel/id/123<br>Content-Location: /=/model/SomeModel/id/123<br>
<br>On Update<br><br>200 Updated<br>Content-Location: /=/model/SomeModel/id/123<br><br>In the first case, I might also have the Location: header attach the ".yml" or other suffix if one was explicitly given in the request or not include the "Location" header at all and let the user agent do whatever it wants with the Content-Location header (in which relative URIs are okay).
<br><br>I am sending this to the list because it's a change of behavior and I don't want to kick anyone's puppy by changing it.<br><br>Cheers,<br>Andrew<br>