[maemo-commits] [maemo-commits] r14881 - in projects/haf/trunk/apt: . debian methods

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Dec 6 18:09:01 EET 2007
Author: marivoll
Date: 2007-12-06 18:08:55 +0200 (Thu, 06 Dec 2007)
New Revision: 14881

Modified:
   projects/haf/trunk/apt/README.maemo
   projects/haf/trunk/apt/debian/changelog
   projects/haf/trunk/apt/methods/http.cc
Log:
  * Applied http-tablet-identification.patch


Modified: projects/haf/trunk/apt/README.maemo
===================================================================
--- projects/haf/trunk/apt/README.maemo	2007-12-06 16:07:56 UTC (rev 14880)
+++ projects/haf/trunk/apt/README.maemo	2007-12-06 16:08:55 UTC (rev 14881)
@@ -12,3 +12,8 @@
 
 Let's see if I can find the energy to 'port' the missing build
 dependencies to maemo as well.
+
+- http-tablet-identification.patch
+
+Include a default Basic Authentication header in every HTTP request
+that identifies the hardware model of the device.

Modified: projects/haf/trunk/apt/debian/changelog
===================================================================
--- projects/haf/trunk/apt/debian/changelog	2007-12-06 16:07:56 UTC (rev 14880)
+++ projects/haf/trunk/apt/debian/changelog	2007-12-06 16:08:55 UTC (rev 14881)
@@ -1,9 +1,8 @@
 apt (0.7.6maemo0~unreleased) unstable; urgency=low
 
-  * Applied maemostrip.diff:
-    Don't build docs.  Don't build the https method.  Don't build
-    apt-ftparchive.
-
+  * Applied maemostrip.diff
+  * Applied http-tablet-identification.patch
+  
  -- Marius Vollmer <mvo at zagadka.de>  Thu, 06 Dec 2007 17:15:19 +0200
 
 apt (0.7.6) unstable; urgency=low

Modified: projects/haf/trunk/apt/methods/http.cc
===================================================================
--- projects/haf/trunk/apt/methods/http.cc	2007-12-06 16:07:56 UTC (rev 14880)
+++ projects/haf/trunk/apt/methods/http.cc	2007-12-06 16:08:55 UTC (rev 14881)
@@ -714,6 +714,21 @@
    if (Uri.User.empty() == false || Uri.Password.empty() == false)
       Req += string("Authorization: Basic ") + 
           Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
+   else
+     {
+       const char *product_hardware = getenv ("OSSO_PRODUCT_HARDWARE");
+       if (product_hardware)
+	 {
+	   /* This is a cookie that identifies Internet Tablets to the
+	      server.  We use the Authorization header since that is
+	      easier to handle on the server side.
+	   */
+	   string user = string ("NOKIA-OSSO-") + string (product_hardware);
+	   Req += (string("Authorization: Basic ") + 
+		   Base64Encode(user + ":" + "JOSHUA")
+		   + "\r\n");
+	 }
+     }
    
    Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n";
    


More information about the maemo-commits mailing list