[pve-devel] r5749 - pve-manager/pve2/lib/PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Mar 24 07:12:58 CET 2011


Author: dietmar
Date: 2011-03-24 07:12:58 +0100 (Thu, 24 Mar 2011)
New Revision: 5749

Modified:
   pve-manager/pve2/lib/PVE/REST.pm
Log:
simplify code


Modified: pve-manager/pve2/lib/PVE/REST.pm
===================================================================
--- pve-manager/pve2/lib/PVE/REST.pm	2011-03-23 09:43:36 UTC (rev 5748)
+++ pve-manager/pve2/lib/PVE/REST.pm	2011-03-24 06:12:58 UTC (rev 5749)
@@ -27,14 +27,6 @@
 
 # http://perl.apache.org/docs/2.0/api/Apache2/SubProcess.html
 
-sub cookie_string {
-    my ($key, $value) = @_;
-
-    my $cookie = "$key=$value; path=/; secure;";
-
-    return $cookie;
-}
-
 sub extract_auth_cookie {
     my ($cookie) = @_;
 
@@ -46,7 +38,7 @@
 sub create_auth_cookie {
     my ($ticket) = @_;
 
-    return cookie_string($cookie_name, $ticket);
+    return "${cookie_name}=$ticket; path=/; secure;";
 }
 
 sub format_response_data {



More information about the pve-devel mailing list