TFPHTTPClient.FileFormPost: remove recursive path in filename.
Original Reporter info from Mantis: silvioprog
-
Reporter name: silvioprog
Original Reporter info from Mantis: silvioprog
- Reporter name: silvioprog
Description:
Hello,
The method TFPHTTPClient.FileFormPost() isn't working. Comparing your content with content generated by Chrome and Firefox, I found the problem.
E.g. (Chrome):
------WebKitFormBoundaryy5zOZ7YfHERSo2Ly
Content-Disposition: form-data; name="file1"; filename="myfile.exe"
Content-Type: application/octet-string
------WebKitFormBoundaryy5zOZ7YfHERSo2Ly--
FCL-Web:
--008C7F0A_multipart_boundary
Content-Disposition: form-data; name="arquivo"; filename="C:\Users\silvioprog\Desktop\myfile.exe"
Content-Type: application/octet-string
The patch to fix it in attached. Before apply the patch, the TFPHTTPClient.FileFormPost() returns error 500. After apply, it works fine on Linux and Windows (testing with Apache).
Mantis conversion info:
- Mantis ID: 23977
- Fixed in version: 3.0.0
- Fixed in revision: 23677 (#6c0bcfd7)
- Target version: 2.7.1