79784590

Date: 2025-10-07 13:27:16
Score: 3.5
Natty:
Report link

As furas says , I use curl_cffi library. The script below is working well.

import curl_cffi

url='http://********:59599'
header = {'specific-app-header':'01-fr-open-edition-03'}

def post(file_path):
    mp = curl_cffi.CurlMime()

    mp.addpart(
            name="files",
            filename="files.log",
            content_type="application/x-www-form-urlencoded",
            local_path=file_path,
            )
    resp = curl_cffi.post(url, headers=header, stream=True, multipart=mp)
    for line in resp.iter_lines():
        if line:
            print(line.decode())

post('../finder_result/oej/oej-2025-01-01.log')
# .... lines is display 
post('/tmp/2_000_000_lines.log')
# ...  lines is also display

Thank you for all your advice.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • RegEx Blacklisted phrase (3): Thank you for all your advice
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: mathieu