summaryrefslogtreecommitdiffstats
path: root/archives/extend/2015-February/000511.html
blob: c3fde33d0ff93ead8dcaf48d62c37205f826bb48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!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=%3C4E148D98-CFDB-40D4-8532-8E46C8F09DB0%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="000510.html">
   <LINK REL="Next"  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=%3C4E148D98-CFDB-40D4-8532-8E46C8F09DB0%40wanadoo.fr%3E"
       TITLE="[99s-extend] Body length and content-length mismatch">samset at wanadoo.fr
       </A><BR>
    <I>Fri Feb 27 18:07:08 CET 2015</I>
    <P><UL>
        <LI>Previous message: <A HREF="000510.html">[99s-extend] callbacks for additional methods
</A></li>
        <LI>Next 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#511">[ date ]</a>
              <a href="thread.html#511">[ thread ]</a>
              <a href="subject.html#511">[ subject ]</a>
              <a href="author.html#511">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hi,

I&#8217;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,{&lt;&lt;&quot;basic&quot;&gt;&gt;,{&lt;&lt;&#171;<A HREF="https://lists.ninenines.eu/listinfo/extend">xxxxx at xxxxxx</A>&quot;&gt;&gt;,&lt;&lt;&#171;xxxxxxx&quot;&gt;&gt;}},
          {http_req,
              {sslsocket,
                  {gen_tcp,#Port&lt;0.13250&gt;,tls_connection,&lt;0.298.0&gt;},
                  &lt;0.407.0&gt;},
              ranch_ssl,keepalive,&lt;0.408.0&gt;,&lt;&lt;&quot;POST&quot;&gt;&gt;,'HTTP/1.1',
              {{xxxxxxxxx},16220},
              &lt;&lt;&#171;xxxx&quot;&gt;&gt;,undefined,xxxx,&lt;&lt;&#171;xxxxx&quot;&gt;&gt;,undefined,
              &lt;&lt;&gt;&gt;,undefined,
              [{res_1,&lt;&lt;&#171;xxxx&quot;&gt;&gt;}],
              [{&lt;&lt;&quot;content-type&quot;&gt;&gt;,&lt;&lt;&quot;application/json&quot;&gt;&gt;},
               {&lt;&lt;&quot;content-length&quot;&gt;&gt;,&lt;&lt;&quot;2&quot;&gt;&gt;},
               {&lt;&lt;&quot;te&quot;&gt;&gt;,&lt;&lt;&gt;&gt;},
               {&lt;&lt;&quot;host&quot;&gt;&gt;,&lt;&lt;&#171;xxxxx&quot;&gt;&gt;},
               {&lt;&lt;&quot;authorization&quot;&gt;&gt;,
                &lt;&lt;&quot;Basic xxxxxxxxxxxxxx&quot;&gt;&gt;},
               {&lt;&lt;&quot;connection&quot;&gt;&gt;,&lt;&lt;&quot;keep-alive&quot;&gt;&gt;}],
              [{&lt;&lt;&quot;authorization&quot;&gt;&gt;,
                {&lt;&lt;&quot;basic&quot;&gt;&gt;,{&lt;&lt;&#171;xxxxxx&quot;&gt;&gt;,&lt;&lt;&#171;xxxxxx&quot;&gt;&gt;}}},
               {&lt;&lt;&quot;connection&quot;&gt;&gt;,[&lt;&lt;&quot;keep-alive&quot;&gt;&gt;]}],
              undefined,[],waiting,
              &lt;&lt;&quot;{\&quot;login\&quot;:\&#187;<A HREF="https://lists.ninenines.eu/listinfo/extend">xxxx at xxxxxx</A>\&quot;,\&#187;xxxx\&quot;:\&#187;xxxx\&quot;}{\&quot;login\&quot;:\&#187;<A HREF="https://lists.ninenines.eu/listinfo/extend">xxxx at xxxx</A>\&quot;,\&#187;xxxx\&quot;:\&#187;xxxxx\&quot;}&quot;&gt;&gt;,
              undefined,false,waiting,
              [{&lt;&lt;&quot;Access-Control-Allow-Credentials&quot;&gt;&gt;,&lt;&lt;&quot;true&quot;&gt;&gt;},
               {&lt;&lt;&quot;Access-Control-Allow-Origin&quot;&gt;&gt;,
                &lt;&lt;&quot;<A HREF="http://xxxxxxxxx">http://xxxxxxxxx</A>&quot;&gt;&gt;}],
              &lt;&lt;&gt;&gt;,undefined}}
Samir


</PRE>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000510.html">[99s-extend] callbacks for additional methods
</A></li>
	<LI>Next 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#511">[ date ]</a>
              <a href="thread.html#511">[ thread ]</a>
              <a href="subject.html#511">[ subject ]</a>
              <a href="author.html#511">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>