Merge r1025777 TUSCANY-3743: Return correct response code from If-Unmodified-Since

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1027693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
nash 2010-10-26 19:17:45 +00:00
parent 958f042702
commit 6c9f9282a4
2 changed files with 3 additions and 3 deletions

View file

@ -280,7 +280,7 @@ class AtomBindingListenerServlet extends HttpServlet {
Date predicateDate = dateFormat.parse( predicate );
if ( predicateDate.compareTo( exactSeconds(feedUpdated) ) < 0 ) {
// Match, should short circuit
response.sendError(HttpServletResponse.SC_NOT_MODIFIED);
response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
return;
}
} catch ( java.text.ParseException e ) {

View file

@ -290,8 +290,8 @@ public class ProviderFeedEntityTagsTestCase {
ClientResponse res = client.get(providerURI, opts);
Assert.assertNotNull(res);
try {
// Should return 304 - Feed not provided since feed is modified since.
Assert.assertEquals(304, res.getStatus());
// Should return 412 - Feed not provided since feed is modified since.
Assert.assertEquals(412, res.getStatus());
} finally {
res.release();
}