- }\r
- \r
- RxToken = &HttpInstance->RxToken;\r
- RxToken->Packet.RxData->FragmentTable[0].FragmentBuffer = AllocateZeroPool (DEF_BUF_LEN);\r
- if (RxToken->Packet.RxData->FragmentTable[0].FragmentBuffer == NULL) {\r
- Status = EFI_OUT_OF_RESOURCES;\r
- goto Error;\r
- }\r
-\r
- //\r
- // Receive the HTTP headers only when EFI_HTTP_RESPONSE_DATA is not NULL.\r
- //\r
- while (EndofHeader == NULL) { \r
- HttpInstance->IsRxDone = FALSE;\r
- RxToken->Packet.RxData->DataLength = DEF_BUF_LEN;\r
- RxToken->Packet.RxData->FragmentTable[0].FragmentLength = DEF_BUF_LEN;\r
- Status = Tcp4->Receive (Tcp4, RxToken);\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "Tcp4 receive failed: %r\n", Status));\r
- goto Error;\r
- }\r
- \r
- while (!HttpInstance->IsRxDone) {\r
- Tcp4->Poll (Tcp4);\r
- } \r
-\r
- Status = RxToken->CompletionToken.Status;\r
- if (EFI_ERROR (Status)) {\r
- goto Error;\r
- }\r