[xiph-commits] r18452 - icecast/trunk/httpp

ph3-der-loewe at svn.xiph.org ph3-der-loewe at svn.xiph.org
Mon Jul 16 09:05:21 PDT 2012


Author: ph3-der-loewe
Date: 2012-07-16 09:05:21 -0700 (Mon, 16 Jul 2012)
New Revision: 18452

Modified:
   icecast/trunk/httpp/httpp.c
   icecast/trunk/httpp/httpp.h
Log:
commited support for HTTP PUT, See #1812

Modified: icecast/trunk/httpp/httpp.c
===================================================================
--- icecast/trunk/httpp/httpp.c	2012-07-14 13:02:00 UTC (rev 18451)
+++ icecast/trunk/httpp/httpp.c	2012-07-16 16:05:21 UTC (rev 18452)
@@ -342,6 +342,8 @@
         parser->req_type = httpp_req_get;
     } else if (strcasecmp("POST", req_type) == 0) {
         parser->req_type = httpp_req_post;
+    } else if (strcasecmp("PUT", req_type) == 0) {
+        parser->req_type = httpp_req_put;
     } else if (strcasecmp("HEAD", req_type) == 0) {
         parser->req_type = httpp_req_head;
     } else if (strcasecmp("SOURCE", req_type) == 0) {
@@ -392,6 +394,9 @@
         case httpp_req_post:
             httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "POST");
             break;
+        case httpp_req_put:
+            httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "PUT");
+            break;
         case httpp_req_head:
             httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "HEAD");
             break;

Modified: icecast/trunk/httpp/httpp.h
===================================================================
--- icecast/trunk/httpp/httpp.h	2012-07-14 13:02:00 UTC (rev 18451)
+++ icecast/trunk/httpp/httpp.h	2012-07-16 16:05:21 UTC (rev 18452)
@@ -22,7 +22,7 @@
 #define HTTPP_VAR_ICYPASSWORD "__icy_password"
 
 typedef enum httpp_request_type_tag {
-    httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_head,
+    httpp_req_none, httpp_req_get, httpp_req_post, httpp_req_put, httpp_req_head,
     httpp_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknown
 } httpp_request_type_e;
 



More information about the commits mailing list