0

I have discovered a really strange problem when using PhantomJS with Selenium to upload a file. I noticed, that smaller files can be uploaded, while larger files can not.

So I ran a binary search to find out at which filesize it stops working. This revealed that every file bigger than exactly 20000 bytes fails to upload. Since it's not a power of two I guess this limit was set by someone, for some reason, within the whole stack of phantomJS, Ghostdriver or Selenium. I have spend hours pinning down this problem; Has anybody encountered this issue or a clue where to look next?

devsnd
  • 7,382
  • 3
  • 42
  • 50
  • I think it's because the buffer size is 20k and it must timeout trying to refresh the buffer. – Chrispresso Sep 05 '14 at 18:31
  • What do you mean by that? What times out refreshing what buffer? Buffer of the socket, the file handle, etc? – devsnd Sep 05 '14 at 18:36
  • I was just reading through the source code (search 20k)[phantomjs](https://github.com/ariya/phantomjs/blob/master/src/breakpad/src/third_party/curl/curl.h) – Chrispresso Sep 05 '14 at 18:51

0 Answers0