Pull requests

#4 Open
Repository
multani multani
Branch
default
Repository
jespern jespern
Branch
default

Fix #87: Split charset encoding form content-type

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r default https://bitbucket.org/multani/django-piston
hg merge a4e9410422c0
hg commit -m 'Merged in multani/django-piston (pull request #4)'
Author
  1. Jonathan Ballet
Reviewers
Description

Fix bug #87, hope this gets merged one day.

Comments (3)

  1. nanonyme

    Works here.

    While this looks like it solves the problem at hand, this leads me into wondering if Piston is actually handling encodings correctly at all currently. The split in this commit removes the encoding information from content-type but wouldn't the more correct way in content-type parsing to be not only do this but also recover the encoding information to attempt to deliver response using the same encoding that was used for the request? (if supported)

    1. Jonathan Ballet author

      That would probably be a better fix. If you are willing to provide a test case which shows a problem where the encoding is needed, I'm willing to improve my fix, otherwise, I would like this pull request to be merged and to open another ticket for this.

      Actually, this is in my patch queue for too long: it fixes a bug I faced while using Transiflex, and it's feature-wise equivalent to the previous code. I'm no longer using Transiflex nor django-piston, so I have little will to do more work here. If it can close #87, that would be a good thing to me IMO.

      1. nanonyme

        Yeah, I can actually open a new bug if I manage to produce this in the wild. For #87 this is okay.

        I'd stress that I'm not the one to ACK, I was just on my way of upstreaming a similar fix myself and this caught my attention.