diff options
Diffstat (limited to '_build/static/archives/extend/2015-February/000513.html')
-rw-r--r-- | _build/static/archives/extend/2015-February/000513.html | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/_build/static/archives/extend/2015-February/000513.html b/_build/static/archives/extend/2015-February/000513.html new file mode 100644 index 00000000..d8937c71 --- /dev/null +++ b/_build/static/archives/extend/2015-February/000513.html @@ -0,0 +1,130 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> + <HEAD> + <TITLE> [99s-extend] Body length and content-length mismatch + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Body%20length%20and%20content-length%20mismatch&In-Reply-To=%3C62EAECE1-086A-4788-845A-11A1BC6C16AA%40wanadoo.fr%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <style type="text/css"> + pre { + white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */ + } + </style> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000512.html"> + + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[99s-extend] Body length and content-length mismatch</H1> + <B>Samir Sow</B> + <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Body%20length%20and%20content-length%20mismatch&In-Reply-To=%3C62EAECE1-086A-4788-845A-11A1BC6C16AA%40wanadoo.fr%3E" + TITLE="[99s-extend] Body length and content-length mismatch">samset at wanadoo.fr + </A><BR> + <I>Fri Feb 27 18:33:56 CET 2015</I> + <P><UL> + <LI>Previous message: <A HREF="000512.html">[99s-extend] Body length and content-length mismatch +</A></li> + + <LI> <B>Messages sorted by:</B> + <a href="date.html#513">[ date ]</a> + <a href="thread.html#513">[ thread ]</a> + <a href="subject.html#513">[ subject ]</a> + <a href="author.html#513">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Yes. +i’m using httpc. It does not like wrapping a binary string inside a []. +I’ll fix my body. + +Thank you. + +Sincerely. + + + +><i> On 27 févr. 2015, at 18:11, Loïc Hoguin <<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>> wrote: +</I>><i> +</I>><i> It looks like the client is telling you BS. +</I>><i> +</I>><i> On 02/27/2015 06:07 PM, Samir Sow wrote: +</I>>><i> Hi, +</I>>><i> +</I>>><i> I’m facing an issue with the cowboy_req:body call. +</I>>><i> +</I>>><i> The header show a length of 2 while the body itself is a binary string which has a size greater than 2 for sure. +</I>>><i> Trying to use cowboy_req:body with the length option does not make any difference. +</I>>><i> +</I>>><i> How can i retrieve the data ? +</I>>><i> Any clue ? +</I>>><i> +</I>>><i> Thank you +</I>>><i> +</I>>><i> {ok,{<<"basic">>,{<<«<A HREF="https://lists.ninenines.eu/listinfo/extend">xxxxx at xxxxxx</A>">>,<<«xxxxxxx">>}}, +</I>>><i> {http_req, +</I>>><i> {sslsocket, +</I>>><i> {gen_tcp,#Port<0.13250>,tls_connection,<0.298.0>}, +</I>>><i> <0.407.0>}, +</I>>><i> ranch_ssl,keepalive,<0.408.0>,<<"POST">>,'HTTP/1.1', +</I>>><i> {{xxxxxxxxx},16220}, +</I>>><i> <<«xxxx">>,undefined,xxxx,<<«xxxxx">>,undefined, +</I>>><i> <<>>,undefined, +</I>>><i> [{res_1,<<«xxxx">>}], +</I>>><i> [{<<"content-type">>,<<"application/json">>}, +</I>>><i> {<<"content-length">>,<<"2">>}, +</I>>><i> {<<"te">>,<<>>}, +</I>>><i> {<<"host">>,<<«xxxxx">>}, +</I>>><i> {<<"authorization">>, +</I>>><i> <<"Basic xxxxxxxxxxxxxx">>}, +</I>>><i> {<<"connection">>,<<"keep-alive">>}], +</I>>><i> [{<<"authorization">>, +</I>>><i> {<<"basic">>,{<<«xxxxxx">>,<<«xxxxxx">>}}}, +</I>>><i> {<<"connection">>,[<<"keep-alive">>]}], +</I>>><i> undefined,[],waiting, +</I>>><i> <<"{\"login\":\»<A HREF="https://lists.ninenines.eu/listinfo/extend">xxxx at xxxxxx</A>\",\»xxxx\":\»xxxx\"}{\"login\":\»<A HREF="https://lists.ninenines.eu/listinfo/extend">xxxx at xxxx</A>\",\»xxxx\":\»xxxxx\"}">>, +</I>><i> +</I>><i> And looking at this (the buffer of already received data, presumably your whole body, it looks like you receive 2 things. Perhaps the client gives you the count of things instead of the length? +</I>><i> +</I>><i> Either way if the client provides a wrong content-type you should reject the connection. +</I>><i> +</I>>><i> undefined,false,waiting, +</I>>><i> [{<<"Access-Control-Allow-Credentials">>,<<"true">>}, +</I>>><i> {<<"Access-Control-Allow-Origin">>, +</I>>><i> <<"<A HREF="http://xxxxxxxxx">http://xxxxxxxxx</A>">>}], +</I>>><i> <<>>,undefined}} +</I>>><i> Samir +</I>>><i> +</I>>><i> +</I>>><i> _______________________________________________ +</I>>><i> Extend mailing list +</I>>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> +</I>>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A> +</I>>><i> +</I>><i> +</I>><i> -- +</I>><i> Loïc Hoguin +</I>><i> <A HREF="http://ninenines.eu">http://ninenines.eu</A> +</I> +</PRE> + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000512.html">[99s-extend] Body length and content-length mismatch +</A></li> + + <LI> <B>Messages sorted by:</B> + <a href="date.html#513">[ date ]</a> + <a href="thread.html#513">[ thread ]</a> + <a href="subject.html#513">[ subject ]</a> + <a href="author.html#513">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend +mailing list</a><br> +</body></html> |