lib/sw_apps/img_rcvry/src/xbir_http.c
static Xbir_HttpReqType Xbir_HttpDecodeReq (char *HttpReq, u16 HttpReqLen)
{
	Xbir_HttpReqType ReqType = XBIR_HTTP_UNKNOWN;
	char *GetReqStr = "GET";
	char *PostReqStr = "POST";
	char *HeadReqStr = "HEAD";

	if (strncmp(HttpReq, GetReqStr, strlen(GetReqStr)) == 0) {
		ReqType = XBIR_HTTP_GET;
	}
	else if (strncmp(HttpReq, HeadReqStr, strlen(HeadReqStr)) == 0) {
		ReqType = XBIR_HTTP_HEAD;
	}
	else if (strncmp(HttpReq, PostReqStr, strlen(PostReqStr)) == 0) {
		ReqType = XBIR_HTTP_POST;
	}
	else {
		ReqType = XBIR_HTTP_UNKNOWN;
	}

	return ReqType;
}
/*****************************************************************************/
/**
 * @brief
 * This function determines the HTTP request based on input HTTP request string.
 *
 * @param	HttpReq		Pointer to HTTP request string
 *
 * @return	Xbir_HttpReqType	HTTP request type
 *
 *****************************************************************************/
@brief
This function determines the HTTP request based on input HTTP request string.

@param       HttpReq         Pointer to HTTP request string

@return      Xbir_HttpReqType        HTTP request type
@brief This function determines the HTTP request based on input HTTP request string . @param HttpReq Pointer to HTTP request string @return Xbir_HttpReqType HTTP request type
static Xbir_HttpReqType Xbir_HttpDecodeReq (char *HttpReq, u16 HttpReqLen)
{
	Xbir_HttpReqType ReqType = XBIR_HTTP_UNKNOWN;
	char *GetReqStr = "GET";
	char *PostReqStr = "POST";
	char *HeadReqStr = "HEAD";
	if (strncmp(HttpReq, GetReqStr, strlen(GetReqStr)) == 0) {
		ReqType = XBIR_HTTP_GET;
	}
	else if (strncmp(HttpReq, HeadReqStr, strlen(HeadReqStr)) == 0) {
		ReqType = XBIR_HTTP_HEAD;
	}
	else if (strncmp(HttpReq, PostReqStr, strlen(PostReqStr)) == 0) {
		ReqType = XBIR_HTTP_POST;
	}
	else {
		ReqType = XBIR_HTTP_UNKNOWN;
	}
	return ReqType;
}
static Xbir_HttpReqType Xbir_HttpDecodeReq ( char * HttpReq , u16 HttpReqLen ) { Xbir_HttpReqType ReqType = XBIR_HTTP_UNKNOWN ; char * GetReqStr = " " ; char * PostReqStr = " " ; char * HeadReqStr = " " ; if ( strncmp ( HttpReq , GetReqStr , strlen ( GetReqStr ) ) == 0 ) { ReqType = XBIR_HTTP_GET ; } else if ( strncmp ( HttpReq , HeadReqStr , strlen ( HeadReqStr ) ) == 0 ) { ReqType = XBIR_HTTP_HEAD ; } else if ( strncmp ( HttpReq , PostReqStr , strlen ( PostReqStr ) ) == 0 ) { ReqType = XBIR_HTTP_POST ; } else { ReqType = XBIR_HTTP_UNKNOWN ; } return ReqType ; }
@brief
 This function determines the HTTP request based on input HTTP request string.
@brief This function determines the HTTP request based on input HTTP request string .