swifter icon indicating copy to clipboard operation
swifter copied to clipboard

Broken pipe error

Open megakode opened this issue 5 years ago • 2 comments

Symptom: On some iOS devices i get a HTTP 200 as if everything is ok when sharing a directory, but an empty response is returned.

Digging deeper i found that sendFileImpl(...) (in Socket+File.swift) returns -1 after calling write(...) and the posix ERRNO is set to "Broken Pipe".

When trying to read the same file directly from Swift using the FileManager everything is ok, so no missing file or permission should be the cause.

Work perfectly on: iPhone X @ iOS 12.1.4 iPhone XS @ iOS 12.1.1

Always returns error on: iPad Mini 2 @ iOS 10.0.1 iPad Mini 2 @ iOS 11.0 iPad Mini 4 @ iOS 12.2

megakode avatar Mar 28 '19 13:03 megakode

Hey, @megakode Thanks for reporting this. Can you please run the SwifterSampleiOS in your iPad Mini x @ iOS x.x to see the result there when the route/files/:path is requested? Unfortunately, I don't have that specific device to run it myself.

Vkt0r avatar Mar 31 '19 01:03 Vkt0r