mattetti / googlecharts

Ruby Google Chart API
http://mattetti.github.com/googlecharts/
MIT License
699 stars 108 forks source link

414 Request-URI Too Large from :format => :file #19

Open cgriego opened 14 years ago

cgriego commented 14 years ago

I'm graphing 3 months worth of data and it exceeds the URI length allowed by HTTP, creating a 414 Request-URI Too Large exception. googlecharts should use a POST request when the format is writing to a file which increases the supported URI length from 2K to 16K.

http://code.google.com/apis/chart/docs/post_requests.html

mattetti commented 14 years ago

Valid bug and valid suggestions, however if the image is being called from within an html page it won't work. guess we should add a check and a POST request when the file format is requested.

Can you provide a patch by any chance?

cgriego commented 14 years ago

I have started working on a patch.

cgriego commented 14 years ago

Patch complete with zero public interface changes. Specs pass. http://github.com/cgriego/googlecharts/commit/5b6d9908f7ded1baa12e6789c542e174c69fecac

There's a couple of other commits here for your consideration. http://github.com/cgriego/googlecharts/commits/file-post