Index: /trunk/zoo-project/HISTORY.txt
===================================================================
--- /trunk/zoo-project/HISTORY.txt	(revision 827)
+++ /trunk/zoo-project/HISTORY.txt	(revision 828)
@@ -1,3 +1,4 @@
 Version 1.7.0-dev
+  * Support headers for GET requests from the js ZOO-API 
   * Pass all headers listed in the attributes parameter from the
   [security] section to the hosts listed in the hosts parameter of the
Index: /trunk/zoo-project/zoo-api/js/ZOO-api.js
===================================================================
--- /trunk/zoo-project/zoo-api/js/ZOO-api.js	(revision 827)
+++ /trunk/zoo-project/zoo-api/js/ZOO-api.js	(revision 828)
@@ -436,9 +436,10 @@
    * url - {String} The URL to request.
    * params - {Object} Params to add to the url
+   * headers - {Object/Array}  A key-value object of headers
    * 
    * Returns:
    * {String} Request result.
    */
-  Get: function(url,params) {
+    Get: function(url,params,headers) {
     var paramsArray = [];
     for (var key in params) {
@@ -466,5 +467,12 @@
       url += separator + paramString;
     }
-    return ZOORequest('GET',url);
+    if(!(headers instanceof Array)) {
+	var headersArray = [];
+	for (var name in headers) {
+            headersArray.push(name+': '+headers[name]); 
+	}
+	headers = headersArray;
+    }
+    return ZOORequest('GET',url,headers);
   },
   /**
Index: /trunk/zoo-project/zoo-kernel/service_internal_js.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal_js.c	(revision 827)
+++ /trunk/zoo-project/zoo-kernel/service_internal_js.c	(revision 828)
@@ -934,9 +934,19 @@
   }else{
     if(argc==3){
-      char *body=JSValToChar(cx,&argv[2]);
-      InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],body,strlen(body),
-		      INTERNET_FLAG_NO_CACHE_WRITE,0);
-      processDownloads(&hInternet);
-      free(body);
+      if(strncasecmp(method,"GET",3)==0){
+	header=JSVAL_TO_OBJECT(argv[2]);
+	if(JS_IsArrayObject(cx,header)){
+	  setHeader(&hInternet,cx,header);
+	}
+	InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],NULL,0,
+			INTERNET_FLAG_NO_CACHE_WRITE,0);
+	processDownloads(&hInternet);
+      }else{
+	char *body=JSValToChar(cx,&argv[2]);
+	InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],body,strlen(body),
+			INTERNET_FLAG_NO_CACHE_WRITE,0);
+	processDownloads(&hInternet);
+	free(body);
+      }
     }else{
       InternetOpenUrl(&hInternet,hInternet.waitingRequests[hInternet.nb],NULL,0,
Index: /trunk/zoo-project/zoo-kernel/ulinet.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/ulinet.c	(revision 827)
+++ /trunk/zoo-project/zoo-kernel/ulinet.c	(revision 828)
@@ -185,5 +185,5 @@
  * @param proto the protocol requiring the use of a proxy
  */
-bool setProxiesForProtcol(CURL* handle,const char *proto){
+int setProxiesForProtcol(CURL* handle,const char *proto){
 #ifdef MSG_LAF_VERBOSE
   fprintf( stderr, "setProxiesForProtocol (do nothing) ...\n" );
