[Bug fix] Add error exception for header table 60/69160/1
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 12 May 2016 04:52:40 +0000 (13:52 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 12 May 2016 04:52:53 +0000 (13:52 +0900)
Change-Id: Iebeb7ce3fb98195b2e0673d128cbb63cb54d3e39
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/capi-network-http.spec
src/http_header.c

index 7e348f0..e586ffd 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-http
 Summary:       Http Framework
-Version:       0.0.4
+Version:       0.0.5
 Release:       0
 Group:         System/Network
 License:       Apache-2.0
index 6fd5a79..269e416 100644 (file)
@@ -79,6 +79,9 @@ API int http_transaction_header_remove_field(http_transaction_h http_transaction
        gpointer orig_key = NULL;
        gpointer orig_value = NULL;
 
+       _retvm_if(header->hash_table == NULL, HTTP_ERROR_INVALID_OPERATION,
+                       "There are no custom header\n");
+
        g_hash_table_lookup_extended(header->hash_table, field_name, &orig_key, &orig_value);
        if (g_hash_table_remove(header->hash_table, field_name)) {
                if (orig_key)