[frogr] Get rid of code previously taken from libsoup, in FspSession



commit 6cfdf144bd636a024a8bb4adb5090bf6d0bc79de
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Mon Apr 9 00:00:28 2012 +0200

    Get rid of code previously taken from libsoup, in FspSession

 README                      |    4 ----
 src/flicksoup/fsp-session.c |   34 +---------------------------------
 2 files changed, 1 insertions(+), 37 deletions(-)
---
diff --git a/README b/README
index 9ee996e..0b7fb0d 100644
--- a/README
+++ b/README
@@ -66,10 +66,6 @@ keep it as part of the project for the time being.
 
 -------------------------------------------
 
-Some parts of the Frogr's Flickr API implementation (under
-src/flicksoup) based on source code from the libsoup library,
-licensed as LGPLv2 (Copyright 2008 Red Hat, Inc.)
-
 Implementation of the get_gps_coordinate () function inside of the
 FrogrPictureLoader taken from tracker, licensed under the GNU Lesser
 General Public License Version 2.1 (Copyright 2009, Nokia Corp.)
diff --git a/src/flicksoup/fsp-session.c b/src/flicksoup/fsp-session.c
index 805a59a..c2d1dd8 100644
--- a/src/flicksoup/fsp-session.c
+++ b/src/flicksoup/fsp-session.c
@@ -4,9 +4,6 @@
  * Copyright (C) 2010-2011 Mario Sanchez Prada
  * Authors: Mario Sanchez Prada <msanchez igalia com>
  *
- * Some parts of this file were based on source code from the libsoup
- * library, licensed as LGPLv2 (Copyright 2008 Red Hat, Inc.)
- *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General
  * Public License as published by the Free Software Foundation.
@@ -190,11 +187,6 @@ static GHashTable *
 _get_params_table_from_valist           (const gchar *first_param,
                                          va_list      args);
 
-/* This function is based in append_form_encoded() from libsoup's
-   SoupForm, licensed as LGPLv2 (Copyright 2008 Red Hat, Inc.) */
-static gchar *
-_encode_query_value (const char *value);
-
 static gboolean
 _should_encode_key                      (const gchar         *key,
                                          AuthorizationMethod  auth_method);
@@ -861,30 +853,6 @@ _get_params_table_from_valist           (const gchar *first_param,
   return table;
 }
 
-/* This function is based in append_form_encoded() from libsoup's
-   SoupForm, licensed as LGPLv2 (Copyright 2008 Red Hat, Inc.) */
-static gchar *
-_encode_query_value (const char *value)
-{
-  GString *result = NULL;
-  const unsigned char *str = NULL;
-
-  result = g_string_new ("");
-  str = (const unsigned char *) value;
-
-  while (*str) {
-    if (*str == ' ') {
-      g_string_append_c (result, '+');
-      str++;
-    } else if (!g_ascii_isalnum (*str))
-      g_string_append_printf (result, "%%%02X", (int)*str++);
-    else
-      g_string_append_c (result, *str++);
-  }
-
-  return g_string_free (result, FALSE);
-}
-
 static gboolean
 _should_encode_key                      (const gchar         *key,
                                          AuthorizationMethod  auth_method)
@@ -935,7 +903,7 @@ _get_signed_query_with_params           (const gchar         *api_sig,
 
           /* Do not encode basic pairs key-value */
           if (_should_encode_key (key, auth_method))
-            actual_value = _encode_query_value (value);
+            actual_value = _encode_uri (value);
           else
             actual_value = g_strdup (value);
 



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