Increase max header length to 4096 bytes 70/272970/1 accepted/tizen/6.5/unified/20220329.134637 submit/tizen_6.5/20220329.025606
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 29 Mar 2022 01:58:16 +0000 (10:58 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 29 Mar 2022 01:58:16 +0000 (10:58 +0900)
Change-Id: I8107e41c559d96dada2b56c16472d172222984ea

packaging/download-provider.spec
provider-interface/download-provider-interface.c
provider/include/download-provider.h

index 1c4fa7a..a94d990 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       download-provider
 Summary:    Download the contents in background
-Version:    2.2.9
+Version:    2.2.10
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index 5844c32..dfb15e8 100755 (executable)
@@ -1502,7 +1502,7 @@ int dp_interface_add_http_header_field(const int id, const char *field,
                return DOWNLOAD_ADAPTOR_ERROR_INVALID_PARAMETER;
        }
        if (value == NULL || (value_length = strlen(value)) <= 0 ||
-                       value_length > DP_MAX_STR_LEN) {
+                       value_length > DP_MAX_HEADER_LEN) {
                TRACE_ERROR("check value (%zd:%s)", value_length, value);
                return DOWNLOAD_ADAPTOR_ERROR_INVALID_PARAMETER;
        }
index 41c12ea..879c80c 100755 (executable)
@@ -94,6 +94,7 @@ typedef enum {
 
 #define MAX_DOWNLOAD_HANDLE 32
 #define DP_MAX_STR_LEN 2048
+#define DP_MAX_HEADER_LEN 4096
 #define DP_DEFAULT_BUFFER_SIZE 1024
 
 // string to check invalid characters in path before using open() and fopen() API's