Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 198a1bc7 authored by koh.changseok's avatar koh.changseok Committed by Ajay Panicker
Browse files

OPP: Have OBEX add 'End of Body' for a small file

When sending a file sized smaller than 'MaxPAcketSize',
'final packet' doesn't include 'End of body' header for 'put' operation.
Therefore, some devices reply 'Bad Request' response code.

See 'startProcessing()' fucntion in OBEX library.
'OBEX_OPCODE_PUT_FINAL' will be sent without body.

Even it seems Android doesn't implement 'deleting' using 'put' operation,
Spec says 'Body' or 'End of Body' can be omitted for 'Deleting an Object'.

So Instead of changing OBEX, let's change function calling order between
'putOperation.getResponseCode()' and 'outputStream.close()' like Marshmallow OS.
'outputStream.close()' will make OBEX send all stored packets and then
finally make final packet include 'End of Body' header.

Bug: 63554262
Test: Send a file over OBEX to remote device
Change-Id: I12bc3fd801d9a714dde947eb37bad9821ebb9d79
parent 6a5c11bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment