kader990 / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 0 forks source link

Unsupported Media Type in case of lack of 'type' or 'size' selector in file-selector attribute #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Receive a file transfer INVITE with SDP containing in file-selector 
attribute only name & size (no type) selectors. Example would be: 
a=file-selector:name:"alf.jpg" size:24774

What is the expected output? What do you see instead?
Enable user to accept file transfer. Instead a '415 Unsupported Media Type' 
message is sent back.

What version of the product are you using? On what operating system?
2.3.6, Android 2.3.6

Please provide any additional information below.
Looks like stack is expecting to get 'type' selector, like: 
a=file-selector:name:"alf.jpg" type:image/jpeg size:24774

According to RFC 5547, there is no must for such - only one is required (point 
6):
(...)When used in an SDP offer or answer, the 'file-selector' attribute MUST 
contain at least one selector.  Selectors characterize the file to be 
transferred.  There are four selectors in this attribute: 'name', 'size', 
'type', and 'hash'.(...)

The same happens for lack of 'size' selector.

Original issue reported on code.google.com by pkurp...@gmail.com on 31 Jan 2012 at 2:21

GoogleCodeExporter commented 9 years ago
In the RCS-e spec it is mentioned that at least "type" and "size" should be 
part of SDP:
Taking this into account this and with the aim of providing all the necessary 
facts to the receiver to make an informed decision on whether to accept or 
reject the file, a user receiving a file transfer invitation should be informed 
at least of: 
a) The size of the file: This is mainly to protect the user from unexpected 
charges and/or long transfers. 
b) The file type: In this case and to make it more intuitive, the handset 
should present to the user whether the file which is being transferred can be 
handled/displayed by the device. 

For example, if a user receives an invitation to receive a PDF document and 
his/her handset cannot process that sort of documents, an informative message 
with the size and the fact that the file type is not supported should be 
presented to the user prior to the decision of accepting or rejecting the file 
transfer.

Original comment by jmauffret@gmail.com on 21 Feb 2012 at 1:25