gyazo / Gyazo-for-Linux

Gyazo for Linux
http://gyazo.com
352 stars 105 forks source link

Bad Request from upload.cgi #128

Closed scrayos closed 5 years ago

scrayos commented 5 years ago

Since a few weeks (at least since the 12th of January) I cannot upload any screenshots above a certain size (not much larger than 300x160/6.6kB, cannot really say a fixed size) or I'll get a response of "400 Bad Request" from the official upload.cgi.

I've tested it with and without my gyazo.id and I've confirmed, that the assembled data seems to be correct (I can upload it here, if it's needed) but the response is empty and I get a bad response.

HTTP Code: 400 HTTP Message: Bad Request HTTP Response Headers: {"server"=>["nginx/1.12.2"], "date"=>["Thu, 31 Jan 2019 01:08:20 GMT"], "content-type"=>["text/plain; charset=utf-8"], "content-length"=>["1"], "x-content-type-options"=>["nosniff"], "via"=>["1.1 google"], "alt-svc"=>["clear"]} HTTP Body: A single linebreak/empty

The image itself and the whole request body are formatted correctly, and the response is the same, regardless of my gyazo-id. Small Images work as usual.

scrayos commented 5 years ago

I, by the way, successfully reproduced this same behavior on my laptop and with a different internet-connection/router, just in case some firewalling messes anything up. My normal PC and laptop are both running Antergos (Archlinux) and the current Kernel is 4.20.5-arch1-1-ARCH. I use this packaging, but I also built my own version (with the sourcecode from this repository) which did not work aswell.

hiroshi commented 5 years ago

Hi,

Can you give us reproducible image you've tried to upload? Attach the images or a zipped archive on a comment if you don't care, or send them to contact@gyazo.com as attachments. (mentioning me @hiroshi or this issue url may help support team forward it to me ;-)

scrayos commented 5 years ago

Thanks for your response!

I performed updates yesterday (as I do every 2-4 days) and it seems to be resolved on its own. Potentially this was caused by a faulty ruby-version, as it was fixed after the update of ruby: https://www.archlinux.org/packages/extra/x86_64/ruby/

The update was released on the 2nd of February and so it was three days after I created this ticket. I'm sorry however, as it turned out this was in fact not a gyazo-bug, but rather a bug in ruby itself. Therefore I'll close it now. :)

hiroshi commented 5 years ago

@Scrayos I'm happy to hear it works again anyway :-)