aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-01-14 18:20:19 +0000
committerChristian Grothoff <christian@grothoff.org>2011-01-14 18:20:19 +0000
commit1bc35ab9741ab65104ae15cbed0f7587b549d09c (patch)
treef8e9b6e71a8b42bc5fb9108cfab8f21a83b73c9b /src
parente3401afa64386ee919db223ec96b609307a1ad6a (diff)
downloadlibmicrohttpd-1bc35ab9741ab65104ae15cbed0f7587b549d09c.tar.gz
libmicrohttpd-1bc35ab9741ab65104ae15cbed0f7587b549d09c.zip
fixes
Diffstat (limited to 'src')
-rw-r--r--src/daemon/EXPORT.sym2
-rw-r--r--src/daemon/base64.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/daemon/EXPORT.sym b/src/daemon/EXPORT.sym
index 198fe781..e2b1165c 100644
--- a/src/daemon/EXPORT.sym
+++ b/src/daemon/EXPORT.sym
@@ -11,6 +11,8 @@ MHD_queue_response
11MHD_create_response_from_callback 11MHD_create_response_from_callback
12MHD_create_response_from_data 12MHD_create_response_from_data
13MHD_create_response_from_fd 13MHD_create_response_from_fd
14MHD_create_response_from_fd_at_offset
15MHD_create_response_from_buffer
14MHD_destroy_response 16MHD_destroy_response
15MHD_add_response_header 17MHD_add_response_header
16MHD_add_response_footer 18MHD_add_response_footer
diff --git a/src/daemon/base64.c b/src/daemon/base64.c
index 0ac002a7..8ea73006 100644
--- a/src/daemon/base64.c
+++ b/src/daemon/base64.c
@@ -27,11 +27,14 @@ static const char base64_digits[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
27 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
28 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 28 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
29 29
30#if 0
30char* BASE64Encode(const char* src) { 31char* BASE64Encode(const char* src) {
31 unsigned int in_len = strlen(src); 32 unsigned int in_len = strlen(src);
32 char* dest = (char*)malloc((in_len + 2 - ((in_len + 2) % 3)) / 3 * 4 + 1); 33 char* dest = malloc((in_len + 2 - ((in_len + 2) % 3)) / 3 * 4 + 1);
33 char* result = dest; 34 char* result = dest;
34 35
36 if (dest == NULL)
37 return NULL;
35 while (*src) { 38 while (*src) {
36 dest[0] = base64_chars[(src[0] & 0xfc) >> 2]; 39 dest[0] = base64_chars[(src[0] & 0xfc) >> 2];
37 dest[1] = base64_chars[((src[0] & 0x03) << 4) + ((src[1] & 0xf0) >> 4)]; 40 dest[1] = base64_chars[((src[0] & 0x03) << 4) + ((src[1] & 0xf0) >> 4)];
@@ -54,6 +57,7 @@ char* BASE64Encode(const char* src) {
54 return result; 57 return result;
55 58
56} 59}
60#endif
57 61
58char* BASE64Decode(const char* src) { 62char* BASE64Decode(const char* src) {
59 unsigned int in_len = strlen(src); 63 unsigned int in_len = strlen(src);