[maemo-commits] [maemo-commits] r14743 - projects/haf/trunk/apt
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Nov 8 14:16:53 EET 2007
- Previous message: [maemo-commits] r14742 - in projects/tools/trunk/maemo_testing: . writing-hildon-desktop-plugins
 - Next message: [maemo-commits] r14744 - in projects/haf/trunk/apt: . debian methods
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
 
Author: marivoll
Date: 2007-11-08 14:16:52 +0200 (Thu, 08 Nov 2007)
New Revision: 14743
Added:
   projects/haf/trunk/apt/http-tablet-identification.patch
Log:
New.  Never ask, never tell.
Added: projects/haf/trunk/apt/http-tablet-identification.patch
===================================================================
--- projects/haf/trunk/apt/http-tablet-identification.patch	2007-11-08 11:41:57 UTC (rev 14742)
+++ projects/haf/trunk/apt/http-tablet-identification.patch	2007-11-08 12:16:52 UTC (rev 14743)
@@ -0,0 +1,26 @@
+Index: methods/http.cc
+===================================================================
+--- methods/http.cc	(revision 9895)
++++ methods/http.cc	(working copy)
+@@ -712,6 +712,21 @@ void HttpMethod::SendReq(FetchItem *Itm,
+    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\r\n\r\n";
+    
    - Previous message: [maemo-commits] r14742 - in projects/tools/trunk/maemo_testing: . writing-hildon-desktop-plugins
 - Next message: [maemo-commits] r14744 - in projects/haf/trunk/apt: . debian methods
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
 
