lib/sw_apps/img_rcvry/src/xbir_http.c
int Xbir_HttpProcessReq (struct tcp_pcb *Tpcb, u8 *HttpReq, u16 HttpReqLen)
{
	int Status = XST_FAILURE;
	Xbir_HttpReqType ReqType;

	ReqType = Xbir_HttpDecodeReq((char *)HttpReq, HttpReqLen);
	switch (ReqType) {
	case XBIR_HTTP_GET:
	case XBIR_HTTP_HEAD:
		Status = Xbir_HttpProcessGetReq(Tpcb, HttpReq, HttpReqLen);
		break;

	case XBIR_HTTP_POST:
		Status = Xbir_HttpProcessPostReq(Tpcb, HttpReq, HttpReqLen);
		break;

	default:
		Xbir_Printf("ERROR: RequestType != GET|POST\r\n");
		Status = Xbir_HttpSendResponse404(Tpcb, HttpReq, HttpReqLen);
		break;
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief
 * This function processes input HTTP request to send response.
 * This assumes that tcp_sndbuf is high enough to send atleast 1 packet.
 *
 * @param	Tpcb		Pointer to TCP PCB
 * @param	HttpReq		Pointer to HTTP payload
 * @param	HttpReqLen	HTTP payload length
 *
 * @return	XST_SUCCESS on success
 *		Error code on failure
 *
 *****************************************************************************/
@brief
This function processes input HTTP request to send response.
This assumes that tcp_sndbuf is high enough to send atleast 1 packet.

@param       Tpcb            Pointer to TCP PCB
@param       HttpReq         Pointer to HTTP payload
@param       HttpReqLen      HTTP payload length

@return      XST_SUCCESS on success
Error code on failure
@brief This function processes input HTTP request to send response . This assumes that tcp_sndbuf is high enough to send atleast 1 packet . @param Tpcb Pointer to TCP PCB @param HttpReq Pointer to HTTP payload @param HttpReqLen HTTP payload length @return XST_SUCCESS on success Error code on failure
int Xbir_HttpProcessReq (struct tcp_pcb *Tpcb, u8 *HttpReq, u16 HttpReqLen)
{
	int Status = XST_FAILURE;
	Xbir_HttpReqType ReqType;
	ReqType = Xbir_HttpDecodeReq((char *)HttpReq, HttpReqLen);
	switch (ReqType) {
	case XBIR_HTTP_GET:
	case XBIR_HTTP_HEAD:
		Status = Xbir_HttpProcessGetReq(Tpcb, HttpReq, HttpReqLen);
		break;
	case XBIR_HTTP_POST:
		Status = Xbir_HttpProcessPostReq(Tpcb, HttpReq, HttpReqLen);
		break;
	default:
		Xbir_Printf("ERROR: RequestType != GET|POST\r\n");
		Status = Xbir_HttpSendResponse404(Tpcb, HttpReq, HttpReqLen);
		break;
	}
	return Status;
}
int Xbir_HttpProcessReq ( struct tcp_pcb * Tpcb , u8 * HttpReq , u16 HttpReqLen ) { int Status = XST_FAILURE ; Xbir_HttpReqType ReqType ; ReqType = Xbir_HttpDecodeReq ( ( char * ) HttpReq , HttpReqLen ) ; switch ( ReqType ) { case XBIR_HTTP_GET : case XBIR_HTTP_HEAD : Status = Xbir_HttpProcessGetReq ( Tpcb , HttpReq , HttpReqLen ) ; break ; case XBIR_HTTP_POST : Status = Xbir_HttpProcessPostReq ( Tpcb , HttpReq , HttpReqLen ) ; break ; default : Xbir_Printf ( " \r \n " ) ; Status = Xbir_HttpSendResponse404 ( Tpcb , HttpReq , HttpReqLen ) ; break ; } return Status ; }
@brief
 This function processes input HTTP request to send response.
@brief This function processes input HTTP request to send response .