lib/sw_apps/img_rcvry/src/xbir_http.c
static int Xbir_HttpProcessGetReq (struct tcp_pcb *Tpcb, u8 *HttpReq,
	u16 HttpReqLen)
{
	char FileName[XBIR_HTTP_MAX_FILE_NAME_LEN] = "";

	Xbir_HttpExtractFileName((char *)HttpReq, HttpReqLen, FileName,
		XBIR_HTTP_MAX_FILE_NAME_LEN - 1U);

	if (strncmp(FileName, "sys_info", strlen("sys_info")) == 0) {
		Xbir_HttpProcessGetSysInfoReq(Tpcb, HttpReq, HttpReqLen);
	}
	else if (strncmp(FileName, "boot_img_status",
		strlen("boot_img_status")) == 0) {
		Xbir_HttpProcessGetBootImgStatusReq(Tpcb, HttpReq, HttpReqLen);
	}
	else {
		Xbir_HttpProcessGetFileReq(Tpcb, HttpReq, HttpReqLen);
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 * @brief
 * This function processes HTTP GET request and sends the response
 *
 * @param	Tpcb		Pointer to TCP PCB
 * @param	HttpReq		Pointer to HTTP payload
 * @param	HttpReqLen	HTTP payload length
 *
 * @return	XST_SUCCESS if request is processed successfully
 *		XST_FAILURE if request is not processed
 *
 *****************************************************************************/
@brief
This function processes HTTP GET request and sends the response

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

@return      XST_SUCCESS if request is processed successfully
XST_FAILURE if request is not processed
@brief This function processes HTTP GET request and sends the response @param Tpcb Pointer to TCP PCB @param HttpReq Pointer to HTTP payload @param HttpReqLen HTTP payload length @return XST_SUCCESS if request is processed successfully XST_FAILURE if request is not processed
static int Xbir_HttpProcessGetReq (struct tcp_pcb *Tpcb, u8 *HttpReq,
	u16 HttpReqLen)
{
	char FileName[XBIR_HTTP_MAX_FILE_NAME_LEN] = "";
	Xbir_HttpExtractFileName((char *)HttpReq, HttpReqLen, FileName,
		XBIR_HTTP_MAX_FILE_NAME_LEN - 1U);
	if (strncmp(FileName, "sys_info", strlen("sys_info")) == 0) {
		Xbir_HttpProcessGetSysInfoReq(Tpcb, HttpReq, HttpReqLen);
	}
	else if (strncmp(FileName, "boot_img_status",
		strlen("boot_img_status")) == 0) {
		Xbir_HttpProcessGetBootImgStatusReq(Tpcb, HttpReq, HttpReqLen);
	}
	else {
		Xbir_HttpProcessGetFileReq(Tpcb, HttpReq, HttpReqLen);
	}
	return XST_SUCCESS;
}
static int Xbir_HttpProcessGetReq ( struct tcp_pcb * Tpcb , u8 * HttpReq , u16 HttpReqLen ) { char FileName [ XBIR_HTTP_MAX_FILE_NAME_LEN ] = " " ; Xbir_HttpExtractFileName ( ( char * ) HttpReq , HttpReqLen , FileName , XBIR_HTTP_MAX_FILE_NAME_LEN - 1U ) ; if ( strncmp ( FileName , " " , strlen ( " " ) ) == 0 ) { Xbir_HttpProcessGetSysInfoReq ( Tpcb , HttpReq , HttpReqLen ) ; } else if ( strncmp ( FileName , " " , strlen ( " " ) ) == 0 ) { Xbir_HttpProcessGetBootImgStatusReq ( Tpcb , HttpReq , HttpReqLen ) ; } else { Xbir_HttpProcessGetFileReq ( Tpcb , HttpReq , HttpReqLen ) ; } return XST_SUCCESS ; }
@brief
 This function processes HTTP GET request and sends the response
@brief This function processes HTTP GET request and sends the response