[MacRuby] #1306: PUT request corrupts binary data (net/http)
#1306: PUT request corrupts binary data (net/http) ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- https://gist.github.com/980256 is small sample code, but not a reduction When I try to PUT an attachment into a CouchDB, it fails and returns an 500 response, but the code works fine on CRuby. A little bit of investigation into CouchDB revealed that that can happen when the attachment is corrupt. I suspect the problem is in how net/http handles binary data because reading in the file and writing out does not change the data. -- Ticket URL: <http://www.macruby.org/trac/ticket/1306> MacRuby <http://macruby.org/>
#1306: PUT request corrupts binary data (net/http) ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Vincent suggested a workaround where I call #force_encoding(Encoding::BINARY) on the string first, and that works. -- Ticket URL: <http://www.macruby.org/trac/ticket/1306#comment:1> MacRuby <http://macruby.org/>
#1306: PUT request corrupts binary data (net/http) ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): I think this is a duplicate of #1156 -- Ticket URL: <http://www.macruby.org/trac/ticket/1306#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby