makerbot/ReplicatorG — pull request #283 by xtremd (2012-08-26 07:16:14+00:00)
Title: Fix support for unofficial firmware update servers that do not include type tags in their HTTP responses.

Hey all, how's it going? Here's a solution to a ghost bug I've been dealing with all day now.

For some servers, the HTTP 200 OK return packets (containing the requested firmware file data) are not headed with a "Content-Type: text/plain" and therefore silently fail to be saved to disk. This silent failure can prove very frustrating for users who want to use un-official firmware update servers by entering their URL into RepG's preference pane and are unsure why ReplicatorG appears to successfully fetch and parse the firmware.xml, but doesn't actually end up saving the new files. This commit fixes the bug by dealing with the packet data in its (almost) raw form, thus rendering the type tag unnecessary.

For some reason, this error doesn't show up on any log file (ReplicatorG or otherwise) in any log level, but was diagnosed through a lengthy packet-by-packet investigation with Wireshark. Here's the annotated screen capture and side-by-side comparison of the two server responses: http://goo.gl/IV0QP

Happy Hacking!
-Winter Guerra