Index: /trunk/FACT++/src/rainsensor.cc
===================================================================
--- /trunk/FACT++/src/rainsensor.cc	(revision 18994)
+++ /trunk/FACT++/src/rainsensor.cc	(revision 18995)
@@ -185,9 +185,12 @@
     void PostRequest()
     {
+        const string auth = fAuthentication.empty() ? "" :
+            "Authorization: Basic "+fAuthentication+"\r\n";
+
         const string cmd =
             "GET "+fSite+" HTTP/1.1\r\n"
             "Accept: */*\r\n"
             "Content-Type: application/octet-stream\r\n"
-            "Authorization: Basic "+fAuthentication+"\r\n"
+            +auth+
             "User-Agent: FACT\r\n"
             "Host: www.fact-project.org\r\n"
@@ -287,4 +290,10 @@
     void SetAuthentication(const string &user, const string &password)
     {
+        if (user.empty() && password.empty())
+        {
+            fAuthentication = "";
+            return;
+        }
+
         const string auth = user+":"+password;
 
@@ -437,4 +446,7 @@
     int EvalOptions(Configuration &conf)
     {
+        const string user = conf.Has("user") ? conf.Get<string>("user") : "";
+        const string pass = conf.Has("password") ? conf.Get<string>("password") : "";
+
         fRain.SetInterval(conf.Get<uint16_t>("interval"));
         fRain.SetDebugTx(conf.Get<bool>("debug-tx"));
@@ -442,5 +454,5 @@
         fRain.SetSite(conf.Get<string>("url"));
         fRain.SetEndpoint(conf.Get<string>("addr"));
-        fRain.SetAuthentication(conf.Get<string>("user"), conf.Get<string>("password"));
+        fRain.SetAuthentication(user, pass);
         fRain.StartConnect();
 
@@ -468,11 +480,11 @@
         ("no-dim,d",  po_switch(), "Disable dim services")
         ("addr,a",  var<string>("www.magic.iac.es:80"),  "Network address of Cosy")
-        ("url,u",  var<string>("/site/weather/protected/current.json"),  "File name and path to load")
+        ("url,u",  var<string>("/site/weather/rain_current.json"),  "File name and path to load")
         ("quiet,q", po_bool(true),  "Disable printing contents of all received messages (except dynamic data) in clear text.")
         ("interval,i", var<uint16_t>(60), "Interval between two updates on the server in seconds")
         ("debug-tx", po_bool(), "Enable debugging of ethernet transmission.")
         ("debug-rx", po_bool(), "Enable debugging of ethernet receptions.")
-        ("user", var<string>("FACT")->required(), "User name for authentication.")
-        ("password", var<string>()->required(), "Password for authentication.")
+        ("user", var<string>(), "User name for authentication.")
+        ("password", var<string>(), "Password for authentication.")
         ;
 
