Home > Back-end >  IdHTTPServer receiving compound content
IdHTTPServer receiving compound content

Time:09-16




 
A boundary:=IdGlobalProtocols ExtractHeaderSubItem (ARequestInfo ContentType, 'boundary', QuoteHTTP);
A boundary:='-' + boundary;
Repeat
TmpStr:=ReadLnFromStream (ARequestInfo PostStream, 1, true);
Memo1. Lines. The Add (tmpStr);
Until tmpStr=a boundary;


The first question: online search to this paragraph, complains, I feel is read to the end, read this paragraph of flow control feel missing a EOF judgment?

The second question: in a way to read (domestic) :
TmpStr:=StreamToString (ARequestInfo. PostStream);
Can read content, but there are stil, use UTF8ToWideString (ARequestInfo. PostStream) are still garbled, for help,

Seek guidance
  • Related