mormot取multipart分界符

mormot取multipart分界符

function getBoundary(const inContentType: RawUTF8): RawUTF8; //multipart 分界符
var boundary: RawUTF8;
    i,j: integer;
    P: PUTF8Char;
    part: TMultiPart;
begin
  Result := '';
  i := PosEx('boundary=',inContentType);
  if i=0 then
    exit;
  TrimCopy(inContentType,i+9,200,boundary);
  if (boundary<>'') and (boundary[1]='"') then
    boundary := copy(boundary,2,length(boundary)-2); // "boundary" -> boundary
  Result := boundary;
end;

  

上一篇:Postman - 基本使用


下一篇:小C语言--词法分析程序