MarketSquare / robotframework-requests

Robot Framework keyword library wrapper for requests
http://marketsquare.github.io/robotframework-requests/
MIT License
487 stars 280 forks source link

File Descriptor Not Closed For File Parameter #378

Closed blaw859 closed 7 months ago

blaw859 commented 1 year ago

In RequestsKeywords.py there is a comment on line 51 # file descriptors should be closed for files parameter as well

As far as I am aware this is not happening, for example if you open a file for streaming, put it in a tuple with its filename, then in a dictionary where the name maps to this tuple. If you passed this dictionary to the PUT request using kwargs, files=my_dict the file descriptor for the file object created would never be closed

Apologies if this issue already exists elsewhere as the comment seems to imply it would, however I could not find it

lucagiove commented 7 months ago

I think that I should have added a FIXME prefix, I don't recall but probably I added it when I discover that file descriptors can be passed to files parameters as well. Indeed the commit where I added it is where I used this feature for a test.

lucagiove commented 7 months ago

try with the new version and let me know