vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
577 stars 102 forks source link

callback not working with php_fastcgi because of missing content-length header #45

Closed jeff1985 closed 8 years ago

jeff1985 commented 8 years ago

Hi!

I'm trying to implement a php application that will be receiving screenshots generated by manet. I've faced difficulties receiving the screenshots with the callback url.

My logs show:

[Fri Nov 20 01:15:29 2015] [error] [client 127.0.0.1] chunked Transfer-Encoding forbidden: /php5-fcgi/index.php

From my understanding this is because you stream the file directly to the POST request without specifying the content length.

fileStream.pipe(request.post(callbackUrl, (err) => { if (err) { sendError(res, 'Error while streaming image file: ' + err.message); } onImageFileSent(file, config); }));

For me this means that i'm not able to use the callback function for my php application. Can you please add a Content-Length header?

vbauer commented 8 years ago

Thank you for information, I've just fixed it.