Closed GoogleCodeExporter closed 9 years ago
Thanks, Matt. This looks good. I'll commit it on tues.
Original comment by mark.r.r...@gmail.com
on 24 May 2009 at 1:03
From my testing, it doesn't look like content-type is needed as long as
content-length is specified. Can you confirm this?
Original comment by mark.r.r...@gmail.com
on 26 May 2009 at 7:45
Original comment by mark.r.r...@gmail.com
on 26 May 2009 at 8:23
I just tested on webrick again. If there is a Content-Length, but no
Content-Type the
server seems to try and guess the mime type. It guesses application/xml with xml
posts. But with other types like jpeg, it sometimes gets
application/octet-stream or
image/jpeg. Other times it ignores the data completely.
Essentially, it may work fine with no Content-Type, because pyactiveresource
just
uses XML. But once, or if it is updated to do other types of POST and PUT
operations,
it should be included.
For example, right now, if you want to upload a 10 MB file with POST, you need
to
base64 it and put it inside xml. Ideally you would just attach the raw file to
the
bottom of the http request and say the content type is image/jpeg.
So it is one of those grey areas. Where it does not matter now, but may later.
Original comment by matthew....@gmail.com
on 26 May 2009 at 11:29
Original issue reported on code.google.com by
matthew....@gmail.com
on 21 May 2009 at 11:25Attachments: