<HTML><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content=IE=5 http-equiv=X-UA-Compatible>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE id=mysingle_style type=text/css>P {
        MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN-TOP: 5px
}
TD {
        MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN-TOP: 5px
}
LI {
        MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN-TOP: 5px
}
BODY {
        FONT-SIZE: 9pt; FONT-FAMILY: Arial, arial; MARGIN: 10px; LINE-HEIGHT: 1.4
}
</STYLE>

<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY>
<P>Hi Ryan,</P>
<P> </P>
<P>Yes, after applying proper json body, upload is working.</P>
<P> </P>
<P>Thanks a lot :)</P>
<P> </P>
<P>Regards,</P>
<P>Manoj</P>
<P> </P>
<P>------- <B>Original Message</B> -------</P>
<P><B>Sender</B> : Ryan Kelly<rfkelly@mozilla.com></P>
<P><B>Date</B> : Nov 13, 2014 03:00 (GMT+05:30)</P>
<P><B>Title</B> : Re: Error in POST /1.5/10196463/storage/tabs request</P>
<P> </P>On 13/11/2014 12:09 AM, Manoj Kumar S wrote:<BR>> <BR>>  I am back with one more issue :-) With your help, I am able to<BR>> authorize and download the tabs properly,<BR>> <BR><BR>Great!  There's a lot of work to get to that point, nicely done.<BR><BR>> <BR>> But if I *try to upload the tabs data*, I am getting *400 http error*.<BR>> <BR>> < HTTP/1.1 400 Bad Request<BR>> < Server: openresty/1.7.0.1<BR>> < Date: Wed, 12 Nov 2014 11:03:32 GMT<BR>> < Content-Type: application/json; charset=UTF-8<BR>> < Content-Length: 1<BR>> < Connection: keep-alive<BR>> < X-Weave-Timestamp: 1415790212.00<BR>> * HTTP error before end of send, stop sending<BR>> <<BR>> * Closing connection #0<BR><BR>Did the response return a body at all?  From "Content-Length: 1" it<BR>looks like it should be returning a single-digit error code, which you<BR>may be able to correlate to codes listed here:<BR><BR>  http://docs.services.mozilla.com/respcodes.html<BR><BR>(It may also be returning a code of "0" which means "unknown or<BR>unexpected error")<BR><BR>> <BR>> Here is my request header and body,<BR>>  <BR>> *Body :*<BR>> <BR>> [<BR>> <BR>> {"ttl":604800,<BR>> <BR>> "id":"48:5A:3F:50:6F:61_0",<BR>> <BR>> "payload":"{"ciphertext":"riObd5rAAv6Fpj\/CnhLrM1Dxl5BB6fuGoHhCMk7kkLeinppK+lcwzM87rmN5NX8e8ZeKfFfzUWSGP6mIWXfaZggL0MjB2lcSibUaj5iDvuU=",<BR>> <BR>> "IV":"ybtBTctsolEtBt72SmY2qQ==",<BR>> <BR>> "hmac":"099e0638503b3ed0fcfa817c6cd57677ea869f50da96dea0084c48d7f12c9ed6"}"<BR>> <BR>> }<BR>> <BR>> ]<BR><BR><BR>It may be due to the way you have copy-pasted into the email here, but<BR>as written, this is not valid JSON.  The "payload" field contains<BR>unescaped quote characters, e.g. what is shown above as:<BR><BR>    "payload": "{"ciphertext": ...<BR><BR>Should have the inner quotes explicitly escaped like:<BR><BR>    "payload": "{\"ciphertext\": ...<BR><BR><BR>Hope this helps,<BR><BR>    Ryan<BR><BR>
<P> </P><!--SP:manojkumar.s-->
<P>Thanks,<BR>Manoj</P><!--manojkumar.s:EP-->
<P> </P>
<TABLE id=confidentialsignimg>
<TBODY>
<TR>
<TD NAMO_LOCK>
<P><IMG border=0 src="cid:OUUB9220TQUP@namo.co.kr"></P></TD></TR></TBODY></TABLE></BODY></HTML><img src='http://ext.samsung.net/mailcheck/SeenTimeChecker?do=daca5f29ec351d67e7f1fba01019efa9e8c1ee41cd47505d86905d89a565a6e55ae294939dd64ac078b72e7a65da3d59720175c7c1788460326bbdfb2ea96a2fcf878f9a26ce15a0' border=0 width=0 height=0 style='display:none'>