View Single Post
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#19
Originally Posted by shubell View Post
well the mms decofing patches are from here
https://bugs.maemo.org/show_bug.cgi?id=12733

things should work but did not test them. Even if they don't the basic functionality does not change as it only adds some new ones
Well having a quick look at it, there's a possible problem with the changes to decodeWellKnownCharset method.
(Besides the original problem with the 'decodcedCharSet' typo. Though that may/may not be an actual problem)

Hopefully I got this correct as it's a bit tricky.

Encoded-String-Value can be sent as either 'Text-string or Value-length, Char-set, Text-string'

So if it's octet 127 instead of 128, then we aren't using a charset and we should be using either '*' or ''.
See :
Code:
The special value "*", if present in the Accept-Charset field, matches every character set (including ISO-8859-1) which is not mentioned elsewhere in the Accept-Charset field. If no "*" is present in an Accept-Charset field, then all character sets not explicitly mentioned get a quality value of 0, except for ISO-8859-1, which gets a quality value of 1 if not explicitly mentioned.

If no Accept-Charset header is present, the default is that any character set is acceptable. If an Accept-Charset header is present, and if the server cannot send a response which is acceptable according to the Accept-Charset header, then the server SHOULD send an error response with the 406 (not acceptable) status code, though the sending of an unacceptable response is also allowed.
The patch above is matching with all charsets if one is given and trying to match a specific charset when none is given.
Which doesn't make sense.

Hopefully someone can chime in if I got anything wrong.
 

The Following 3 Users Say Thank You to Ilew For This Useful Post: