-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
Refactored entrance method to remove hardcoded argument list and buffer sizes. Memory for arguments is allocated dynamically, lines from stdin are read with growing buffer.
I am unlikely to merge these right now, as we are just about to release 0.12.1. Considering that you are using FreeBSD, any documentation updates on how you got it working there are more likely to be merged 😄 |
Sure, it can wait until a new version is released. I'll also try to test this patch on Linux. I haven't tried to build and install wkhtmltopdf manually on FreeBSD. FreeBSD has a working port of wkhtmltopdf (converters/wkhtmltopdf) with a bunch of patches against of webkit and javascriptcore. Build is complicated due to two different checkouts - wkhtmltopdf and qt. Anyway port is well documented and maintainers could help to minimize source delta. |
I know -- I've interacted with mm@ for the 0.12.0 version, and some of his suggestions are being implemented for 0.12.1. Just wanted to know if someone could check if the new build system works well on FreeBSD, so that development versions could also be built/tested on it 😄 |
743c688
to
85cdf36
Compare
Could you please tell what is the status of reviewing this pull request? Is it needed to explain changes more thoroughly? |
Sorry, I completely forgot about this. I haven't been getting time due to work pressure/health issues, will try to merge it next week as I'll have to test it for Windows and/or Linux. If you can confirm that it works on a platform other than FreeBSD, I'll merge it as-is. |
No problems, thank you for attention. I had not tested it for Linux so cannot guarantee correct work so it's better to test it. |
can you accept the pullrequest, i met the same issues caused by the long parameters. I also try to modify this by myself. |
Hello again! |
Merged, thanks for the contribution! |
Glad to hear it, thank you! |
Refactored entrance method to remove hardcoded argument list and buffer
sizes. Memory for arguments is allocated dynamically, lines from stdin
are read with growing buffer.
Rationale. Wkhtmltopdf have several hardcoded limits. They are quite large but we have already broken with large argument input files. This patch removes hardcoded limits and allows to use truly infinite argument/buffer sizes. Lack of POSIX getline function on several platforms requires to write a portable replacement fgets_large. Tested for FreeBSD, untested for Windows and Linux (should work).