You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
420 B
31 lines
420 B
#include <string.h>
|
|
|
|
#include "http/request.h"
|
|
|
|
char * http_method[N_HTTP_METHOD] = {
|
|
"OPTIONS",
|
|
"GET",
|
|
"HEAD",
|
|
"POST",
|
|
"PUT",
|
|
"DELETE",
|
|
"TRACE",
|
|
"CONNECT"};
|
|
|
|
int
|
|
httpRequestHasValidMethod(HttpRequest this)
|
|
{
|
|
int i;
|
|
|
|
if (NULL == this->method)
|
|
return 0;
|
|
|
|
for (i=0; i<N_HTTP_METHOD; i++) {
|
|
if (0 == strcmp(http_method[i], this->method))
|
|
break;
|
|
}
|
|
|
|
return (i != N_HTTP_METHOD);
|
|
}
|
|
|
|
// vim: set ts=4 sw=4:
|