[banshee] Prepare Banshee for the new endpoint.



commit dc5606b1658221b61c4496acc403d0c4a0b07cc8
Author: Ruben Vermeersch <ruben savanne be>
Date:   Fri Jun 25 14:29:33 2010 +0200

    Prepare Banshee for the new endpoint.
    
    Signed-off-by: Aaron Bockover <abockover novell com>

 .../Banshee.Metrics/BansheeMetrics.cs              |    2 +-
 src/Libraries/Hyena/Hyena.Metrics/HttpPoster.cs    |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Metrics/BansheeMetrics.cs b/src/Core/Banshee.Services/Banshee.Metrics/BansheeMetrics.cs
index 8be6a9a..89715df 100644
--- a/src/Core/Banshee.Services/Banshee.Metrics/BansheeMetrics.cs
+++ b/src/Core/Banshee.Services/Banshee.Metrics/BansheeMetrics.cs
@@ -126,7 +126,7 @@ namespace Banshee.Metrics
                     var last_post_time = DatabaseConfigurationClient.Client.Get<DateTime> (last_post_key, DateTime.MinValue);
                     var last_post_rel = (DateTime.Now - last_post_time).TotalHours;
                     if (last_post_rel < 0 || last_post_rel > 48.0) {
-                        var poster = new HttpPoster ("http://download.banshee-project.org/metrics/metrics.py";, metrics);
+                        var poster = new HttpPoster ("http://metrics.banshee.fm/submit";, metrics);
                         bool posted = poster.Post ();
                         Log.InformationFormat ("Posted usage data? {0}", posted);
                         if (posted) {
diff --git a/src/Libraries/Hyena/Hyena.Metrics/HttpPoster.cs b/src/Libraries/Hyena/Hyena.Metrics/HttpPoster.cs
index 774b2ba..4ab9112 100644
--- a/src/Libraries/Hyena/Hyena.Metrics/HttpPoster.cs
+++ b/src/Libraries/Hyena/Hyena.Metrics/HttpPoster.cs
@@ -39,6 +39,9 @@ namespace Hyena.Metrics
         {
             this.url = url;
             this.metrics = metrics;
+
+            // Sending the Expect header causes lighttpd to fail with a 417 header.
+            ServicePointManager.Expect100Continue = false;
         }
 
         public bool Post ()
@@ -70,4 +73,4 @@ namespace Hyena.Metrics
             return false;
         }
     }
-}
\ No newline at end of file
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]