diff options
author | Loïc Hoguin <[email protected]> | 2016-08-29 12:39:49 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-29 12:40:03 +0200 |
commit | c807880f7ac73f813b2660ea81a00f7712a4e793 (patch) | |
tree | ba1d09e9b177f230665a80513b33fbd532000ce4 /archives/extend/2015-February/000512.html | |
parent | b1df25a7d9cda697513650659b781b55b40898f8 (diff) | |
download | ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2 ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip |
Add old mailing list archives
Diffstat (limited to 'archives/extend/2015-February/000512.html')
-rw-r--r-- | archives/extend/2015-February/000512.html | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/archives/extend/2015-February/000512.html b/archives/extend/2015-February/000512.html new file mode 100644 index 00000000..f40595c2 --- /dev/null +++ b/archives/extend/2015-February/000512.html @@ -0,0 +1,123 @@ +<!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=%3C54F0A54E.2010205%40ninenines.eu%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="000511.html"> + <LINK REL="Next" HREF="000513.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[99s-extend] Body length and content-length mismatch</H1> + <B>Loïc Hoguin</B> + <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Body%20length%20and%20content-length%20mismatch&In-Reply-To=%3C54F0A54E.2010205%40ninenines.eu%3E" + TITLE="[99s-extend] Body length and content-length mismatch">essen at ninenines.eu + </A><BR> + <I>Fri Feb 27 18:11:42 CET 2015</I> + <P><UL> + <LI>Previous message: <A HREF="000511.html">[99s-extend] Body length and content-length mismatch +</A></li> + <LI>Next message: <A HREF="000513.html">[99s-extend] Body length and content-length mismatch +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#512">[ date ]</a> + <a href="thread.html#512">[ thread ]</a> + <a href="subject.html#512">[ subject ]</a> + <a href="author.html#512">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>It looks like the client is telling you BS. + +On 02/27/2015 06:07 PM, Samir Sow wrote: +><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> +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? + +Either way if the client provides a wrong content-type you should reject +the connection. + +><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> +-- +Loïc Hoguin +<A HREF="http://ninenines.eu">http://ninenines.eu</A> +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000511.html">[99s-extend] Body length and content-length mismatch +</A></li> + <LI>Next message: <A HREF="000513.html">[99s-extend] Body length and content-length mismatch +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#512">[ date ]</a> + <a href="thread.html#512">[ thread ]</a> + <a href="subject.html#512">[ subject ]</a> + <a href="author.html#512">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend +mailing list</a><br> +</body></html> |