diff --git a/helma/Http.js b/helma/Http.js index 3da77ffd..8fcfbee6 100644 --- a/helma/Http.js +++ b/helma/Http.js @@ -9,9 +9,9 @@ * Copyright 1998-2006 Helma Software. All Rights Reserved. * * $RCSfile: Http.js,v $ - * $Author: hannes $ - * $Revision: 1.3 $ - * $Date: 2006/11/21 10:42:25 $ + * $Author: robert $ + * $Revision: 1.4 $ + * $Date: 2007/01/30 14:55:39 $ */ @@ -219,6 +219,21 @@ helma.Http = function() { return (cookies != null) ? cookies[name] : null; }; + /** + * Adds the cookies passed as argument to the list of cookies to send + * to the remote server. + * @param {Array} cookies An array containing objects with the properties + * "name" (the name of the cookie) and "value" (the value of the cookie) set. + */ + this.setCookies = function(cookies) { + if (cookies != null) { + for (var i=0; i 0) { + result.cookies = arr; + } + } + var lastmod = conn.getLastModified(); if (lastmod) result.lastModified = new Date(lastmod); - result.eTag = conn.getHeaderField("ETag"); if (result.length != 0 && result.code == 200) { var body = new java.io.ByteArrayOutputStream();