[99s-extend] Body length and content-length mismatch

Samir Sow samset at wanadoo.fr
Fri Feb 27 18:07:08 CET 2015


Hi,

I’m facing an issue with the cowboy_req:body call.

The header show a length of 2 while the body itself is a binary string which has a size greater than 2 for sure.
Trying to use cowboy_req:body with the length option does not make any difference.

How can i retrieve the data ?
Any clue ?

Thank you

{ok,{<<"basic">>,{<<«xxxxx at xxxxxx">>,<<«xxxxxxx">>}},
          {http_req,
              {sslsocket,
                  {gen_tcp,#Port<0.13250>,tls_connection,<0.298.0>},
                  <0.407.0>},
              ranch_ssl,keepalive,<0.408.0>,<<"POST">>,'HTTP/1.1',
              {{xxxxxxxxx},16220},
              <<«xxxx">>,undefined,xxxx,<<«xxxxx">>,undefined,
              <<>>,undefined,
              [{res_1,<<«xxxx">>}],
              [{<<"content-type">>,<<"application/json">>},
               {<<"content-length">>,<<"2">>},
               {<<"te">>,<<>>},
               {<<"host">>,<<«xxxxx">>},
               {<<"authorization">>,
                <<"Basic xxxxxxxxxxxxxx">>},
               {<<"connection">>,<<"keep-alive">>}],
              [{<<"authorization">>,
                {<<"basic">>,{<<«xxxxxx">>,<<«xxxxxx">>}}},
               {<<"connection">>,[<<"keep-alive">>]}],
              undefined,[],waiting,
              <<"{\"login\":\»xxxx at xxxxxx\",\»xxxx\":\»xxxx\"}{\"login\":\»xxxx at xxxx\",\»xxxx\":\»xxxxx\"}">>,
              undefined,false,waiting,
              [{<<"Access-Control-Allow-Credentials">>,<<"true">>},
               {<<"Access-Control-Allow-Origin">>,
                <<"http://xxxxxxxxx">>}],
              <<>>,undefined}}
Samir




More information about the Extend mailing list