diff --git a/._Makefile b/._Makefile
index c2055de..f3106e7 100644
Binary files a/._Makefile and b/._Makefile differ
diff --git a/plugins/cookiex/cookiex.c b/plugins/cookiex/cookiex.c
index 7a36b2d..d1d260f 100644
--- a/plugins/cookiex/cookiex.c
+++ b/plugins/cookiex/cookiex.c
@@ -18,7 +18,7 @@ void execute(int client,const char* method,dictionary rq)
dictionary d = dict();
dput(d,"test",c);
dput(d,"test1","This is another cookie");
- set_cookie(client,d);
+ set_cookie(client,"text/html; charset=utf-8",d);
LOG("%s",c);
__t(client,"
Set the cookie
");
diff --git a/plugins/plugin.c b/plugins/plugin.c
index 0da0039..662856f 100644
--- a/plugins/plugin.c
+++ b/plugins/plugin.c
@@ -237,17 +237,17 @@ int upload(const char* tmp, const char* path)
{
return !rename(tmp, path);
}
-void set_cookie(int client,dictionary dic)
+void set_cookie(int client,const char* type, dictionary dic)
{
header_base(client);
- __t(client,"Content-Type: text/html; charset=utf-8");
+ __t(client,"Content-Type: %s",type);
association assoc;
for_each_assoc(assoc,dic){
__t(client,"Set-Cookie: %s=%s",assoc->key, (char*)assoc->value);
}
response(client,"");
}
-void clear_cookie(int client, dictionary dic)
+void clear_cookie(int client, dictionary dic)
{
header_base(client);
__t(client,"Content-Type: text/html; charset=utf-8");
diff --git a/plugins/plugin.h b/plugins/plugin.h
index 1366de3..f977101 100644
--- a/plugins/plugin.h
+++ b/plugins/plugin.h
@@ -57,7 +57,7 @@ char* htdocs(const char*);
sqldb getdb();
sqldb __getdb(char *name);
#endif
-void set_cookie(int,dictionary);
+void set_cookie(int, const char*,dictionary);
void clear_cookie(int, dictionary);
/*Default function for plugin*/
void handler(int, const char*,const char*,dictionary);