Jun Furutani / libMiMic

Fork of libMiMic by Ryo Iizuka

Revision:
14:4618692ec239
Parent:
12:efe841863fc8
Child:
41:2389bd6b6f74
diff -r a71705c5e6fd -r 4618692ec239 core/http/NyLPC_cHttpBasicHeaderParser.c
--- a/core/http/NyLPC_cHttpBasicHeaderParser.c	Sun Apr 21 01:21:41 2013 +0000
+++ b/core/http/NyLPC_cHttpBasicHeaderParser.c	Wed Apr 24 08:02:16 2013 +0000
@@ -26,6 +26,24 @@
 #include "NyLPC_cHttpBasicHeaderParser_protected.h"
 #include <stdlib.h>
 
+const char* NyLPC_THttpMethodType_toString(NyLPC_THttpMethodType i_method)
+{
+    static const char* method_prefix[3]={"GET","POST","HEAD"};
+    switch(i_method)
+    {
+    case NyLPC_THttpMethodType_GET:
+        return method_prefix[0];
+    case NyLPC_THttpMethodType_POST:
+        return method_prefix[1];
+    case NyLPC_THttpMethodType_HEAD:
+        return method_prefix[2];
+    default:
+        NyLPC_Abort();
+    }
+    return NULL;
+}
+
+
 NyLPC_TBool NyLPC_THttpBasicHeader_isPersistent(const struct NyLPC_THttpBasicHeader* i_struct)
 {
     switch(i_struct->type)
@@ -810,3 +828,4 @@
 Error:
     return NyLPC_TBool_FALSE;
 }
+