Title: Samsung Enterprise Portal mySingle

Hi Ryan,

 

Yes, after applying proper json body, upload is working.

 

Thanks a lot :)

 

Regards,

Manoj

 

------- Original Message -------

Sender : Ryan Kelly<[email protected]>

Date : Nov 13, 2014 03:00 (GMT+05:30)

Title : Re: Error in POST /1.5/10196463/storage/tabs request

 

On 13/11/2014 12:09 AM, Manoj Kumar S wrote:
>
>  I am back with one more issue :-) With your help, I am able to
> authorize and download the tabs properly,
>

Great!  There's a lot of work to get to that point, nicely done.

>
> But if I *try to upload the tabs data*, I am getting *400 http error*.
>
> < HTTP/1.1 400 Bad Request
> < Server: openresty/1.7.0.1
> < Date: Wed, 12 Nov 2014 11:03:32 GMT
> < Content-Type: application/json; charset=UTF-8
> < Content-Length: 1
> < Connection: keep-alive
> < X-Weave-Timestamp: 1415790212.00
> * HTTP error before end of send, stop sending
> <
> * Closing connection #0

Did the response return a body at all?  From "Content-Length: 1" it
looks like it should be returning a single-digit error code, which you
may be able to correlate to codes listed here:

  http://docs.services.mozilla.com/respcodes.html

(It may also be returning a code of "0" which means "unknown or
unexpected error")

>
> Here is my request header and body,
>  
> *Body :*
>
> [
>
> {"ttl":604800,
>
> "id":"48:5A:3F:50:6F:61_0",
>
> "payload":"{"ciphertext":"riObd5rAAv6Fpj\/CnhLrM1Dxl5BB6fuGoHhCMk7kkLeinppK+lcwzM87rmN5NX8e8ZeKfFfzUWSGP6mIWXfaZggL0MjB2lcSibUaj5iDvuU=",
>
> "IV":"ybtBTctsolEtBt72SmY2qQ==",
>
> "hmac":"099e0638503b3ed0fcfa817c6cd57677ea869f50da96dea0084c48d7f12c9ed6"}"
>
> }
>
> ]


It may be due to the way you have copy-pasted into the email here, but
as written, this is not valid JSON.  The "payload" field contains
unescaped quote characters, e.g. what is shown above as:

    "payload": "{"ciphertext": ...

Should have the inner quotes explicitly escaped like:

    "payload": "{\"ciphertext\": ...


Hope this helps,

    Ryan

 

Thanks,
Manoj

 

_______________________________________________
Dev-fxacct mailing list
[email protected]
https://mail.mozilla.org/listinfo/dev-fxacct

Reply via email to