Bug 731125 - Use correct X-If-Unmodified-Since header. r=rnewman

This commit is contained in:
Richard Newman 2012-03-02 17:36:15 -08:00
parent 3b1d063ea7
commit 09f14ed9ec

View File

@ -165,10 +165,10 @@ public class SyncStorageRequest implements Resource {
public void addHeaders(HttpRequestBase request, DefaultHttpClient client) {
client.getParams().setParameter(CoreProtocolPNames.USER_AGENT, USER_AGENT);
// Clients can use their delegate interface to specify X-Weave-If-Unmodified-Since.
// Clients can use their delegate interface to specify X-If-Unmodified-Since.
String ifUnmodifiedSince = this.request.delegate.ifUnmodifiedSince();
if (ifUnmodifiedSince != null) {
request.setHeader("x-weave-if-unmodified-since", ifUnmodifiedSince);
request.setHeader("x-if-unmodified-since", ifUnmodifiedSince);
}
if (request.getMethod().equalsIgnoreCase("DELETE")) {
request.addHeader("x-confirm-delete", "1");