summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-1.6.1/modules
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-10-20 22:09:15 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2010-10-20 22:09:15 +0000
commit69cfcc6713c6701464df85ac40a75a597c1c39a4 (patch)
tree29f19016e74f2de7cabde0ea47f62caedfc31378 /sca-java-1.x/branches/sca-java-1.6.1/modules
parent84b544b7e32ac0ba99dc349bd9952adb9e4fd98f (diff)
TUSCANY-3743: Return correct response code from If-Unmodified-Since
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1025777 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.6.1/modules')
-rw-r--r--sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java2
-rw-r--r--sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
index 3975fe1220..4765370a9c 100644
--- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
+++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingListenerServlet.java
@@ -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 ) {
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
index fd60ec447e..7ddc193bdc 100644
--- a/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
+++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java
@@ -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();
}