Skip to content

Commit 946a517

Browse files
committed
ICurlField: double build() added another CURLFORM_END.
1 parent 03e1e5d commit 946a517

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Src/Curl.Form.pas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,10 @@ function TCurlField.ContentType(const x : RawByteString) : ICurlField;
512512

513513
function TCurlField.Build : PCurlHttpPost;
514514
begin
515-
Add(CURLFORM_END, nil);
516-
fIsLocked := true;
515+
if not fIsLocked then begin
516+
Add(CURLFORM_END, nil);
517+
fIsLocked := true;
518+
end;
517519
Result := @fData[0];
518520
end;
519521

0 commit comments

Comments
 (0)