mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2024-12-04 14:46:31 -05:00
commited support for HTTP PUT, See #1812
svn path=/icecast/trunk/httpp/; revision=18452
This commit is contained in:
parent
4e4bb16f71
commit
5983b0f6ba
@ -342,6 +342,8 @@ int httpp_parse(http_parser_t *parser, const char *http_data, unsigned long len)
|
|||||||
parser->req_type = httpp_req_get;
|
parser->req_type = httpp_req_get;
|
||||||
} else if (strcasecmp("POST", req_type) == 0) {
|
} else if (strcasecmp("POST", req_type) == 0) {
|
||||||
parser->req_type = httpp_req_post;
|
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) {
|
} else if (strcasecmp("HEAD", req_type) == 0) {
|
||||||
parser->req_type = httpp_req_head;
|
parser->req_type = httpp_req_head;
|
||||||
} else if (strcasecmp("SOURCE", req_type) == 0) {
|
} else if (strcasecmp("SOURCE", req_type) == 0) {
|
||||||
@ -392,6 +394,9 @@ int httpp_parse(http_parser_t *parser, const char *http_data, unsigned long len)
|
|||||||
case httpp_req_post:
|
case httpp_req_post:
|
||||||
httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "POST");
|
httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "POST");
|
||||||
break;
|
break;
|
||||||
|
case httpp_req_put:
|
||||||
|
httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "PUT");
|
||||||
|
break;
|
||||||
case httpp_req_head:
|
case httpp_req_head:
|
||||||
httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "HEAD");
|
httpp_setvar(parser, HTTPP_VAR_REQ_TYPE, "HEAD");
|
||||||
break;
|
break;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define HTTPP_VAR_ICYPASSWORD "__icy_password"
|
#define HTTPP_VAR_ICYPASSWORD "__icy_password"
|
||||||
|
|
||||||
typedef enum httpp_request_type_tag {
|
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_req_source, httpp_req_play, httpp_req_stats, httpp_req_unknown
|
||||||
} httpp_request_type_e;
|
} httpp_request_type_e;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user