Re: [PATCH] http PUT requests

Alexander Malysh <[email protected]> Sat, 3 Aug 2019 22:11:31 +0200
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
--Apple-Mail=_F3CCA1C6-6DCB-4691-ADCC-D09316593AB3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi,

committed to SVN, Thanks for this patch!

Alex


> Am 19.07.2019 um 17:52 schrieb Lamasuta, Franck, Vodafone Automotive =
<[email protected]>:
>=20
> Hi,
> =20
> The new patch tries to parse the vars in the URL then checks the =
content-type value before trying to parse the request body (the RFC =
doesn=E2=80=99t prevent to have vars in the URL andin the body).
> Also, I have optimized parse_cgivars() by using an index to avoid a =
copy of the string, some deletes and a destroy.
> =20
> Regards,
> Franck
> =20
> =20
> From: devel <[email protected]> On Behalf Of Lamasuta, Franck, =
Vodafone Automotive
> Sent: mercredi 17 juillet 2019 12:16
> To: Alexander Malysh <[email protected]>
> Cc: [email protected]
> Subject: RE: [PATCH] http PUT requests
> =20
> I=E2=80=99m working on it=E2=80=A6
> =20
> =20
> From: Alexander Malysh <[email protected] =
<mailto:[email protected]>> On Behalf Of Alexander Malysh
> Sent: vendredi 12 juillet 2019 15:01
> To: Lamasuta, Franck, Vodafone Automotive =
<[email protected] <mailto:[email protected]>>
> Cc: [email protected] <mailto:[email protected]>
> Subject: Re: [PATCH] http PUT requests
> =20
> Hi,
> =20
>=20
> Am 11.07.2019 um 14:24 schrieb Lamasuta, Franck, Vodafone Automotive =
<[email protected] <mailto:[email protected]>>:
> =20
> I thought again about it=E2=80=A6
> I guess you are concerned because the body of all POST or PUT requests =
would be parsed.
> Of course this is bad!   J
> =20
> exactly...
> =20
>=20
> I think we have to check the value of the Content-Type header.
> =20
> This is what we get from Micro Ocean:
> Content-Type: application/x-www-form-urlencoded
>=20
> Would it be ok to test this header before calling parse_cgivars() to =
parse the body?
> Do you have another idea?
> =20
> This should work.
> =20
> Thanks,
> Alex
> =20
>=20
> =20
> Regards,
> Franck
> =20
> =20
> From: devel <[email protected] =
<mailto:[email protected]>> On Behalf Of Lamasuta, Franck, =
Vodafone Automotive
> Sent: jeudi 11 juillet 2019 12:06
> To: Alexander Malysh <[email protected] <mailto:[email protected]>>
> Cc: [email protected] <mailto:[email protected]>
> Subject: RE: [PATCH] http PUT requests
> =20
> Hi Alexander,
> =20
> This is what http_accept_request() logs (with my patch) when Micro =
Ocean submits a DLR:
> =20
> 2019-07-10 13:21:05 [5746] [7] DEBUG: HTTP: Got PUT request with =
url=3D'/MOcean-Kannel/DLR' and =
body=3D'mocean-from=3D33123456789&mocean-to=3DMocean&mocean-dlr-status=3D1=
&mocean-msgid=3D0710212043806340&mocean-error-code=3D0'
> =20
> As you can see, the query variables are in the body of the request. I =
think this is usual for a PUT (and for a POST).
> To avoid code duplication, it seemed logical to slightly modify =
parse_cgivars() to parse the body.
> How would you manage this?
> =20
> Regards,
> Franck
> =20
> =20
> From: Alexander Malysh <[email protected] =
<mailto:[email protected]>> On Behalf Of Alexander Malysh
> Sent: mardi 9 juillet 2019 08:42
> To: Lamasuta, Franck, Vodafone Automotive =
<[email protected] <mailto:[email protected]>>
> Cc: [email protected] <mailto:[email protected]>
> Subject: Re: [PATCH] http PUT requests
> =20
> Hi,
> =20
> sorry for delay. Patch would be ok if not this part where you parse =
body for post and put request
> as cgi vars. this is wrong. Please fix it and resubmit.
> =20
> Thanks,
> Alexander Malysh
> =20
> =20
>=20
> Am 28.06.2019 um 10:58 schrieb Lamasuta, Franck, Vodafone Automotive =
<[email protected] <mailto:[email protected]>>:
> =20
> Hi list,
> =20
> Here is a patch to allow inbound http PUT requests in generic http =
connector.
> It is required to implement Micro Ocean=E2=80=99s API for Delivery =
Reports: https://www.moceanapi.com/docs/#delivery-report =
<https://www.moceanapi.com/docs/#delivery-report>
> =20
> Regards,
> Franck
> <http_put.patch>
> =20
> =20
> <http_put-v2.patch>


--Apple-Mail=_F3CCA1C6-6DCB-4691-ADCC-D09316593AB3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D"">Hi,<div class=3D""><br class=3D""></div><div =
class=3D"">committed to SVN, Thanks for this patch!</div><div =
class=3D""><br class=3D""></div><div class=3D"">Alex</div><div =
class=3D""><br class=3D""><div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D"">Am 19.07.2019 um 17:52 schrieb Lamasuta, =
Franck, Vodafone Automotive &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt;:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"WordSection1" style=3D"page: WordSection1; caret-color: rgb(0, =
0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Hi,<o:p =
class=3D""></o:p></span></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D""><o:p =
class=3D"">&nbsp;</o:p></span></div><div style=3D"margin: 0cm 0cm =
0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">The new patch tries to =
parse the vars in the URL then checks the content-type value before =
trying to parse the request body (the RFC doesn=E2=80=99t prevent to =
have vars in the URL<span class=3D"Apple-converted-space">&nbsp;</span><u =
class=3D"">and</u>in the body).<o:p class=3D""></o:p></span></div><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">Also, I have optimized parse_cgivars() by using an index to =
avoid a copy of the string, some deletes and a destroy.<o:p =
class=3D""></o:p></span></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D""><o:p =
class=3D"">&nbsp;</o:p></span></div><div style=3D"margin: 0cm 0cm =
0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Regards,<o:p =
class=3D""></o:p></span></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Franck<o:p =
class=3D""></o:p></span></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D""><o:p =
class=3D"">&nbsp;</o:p></span></div><div style=3D"margin: 0cm 0cm =
0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><o:p class=3D"">&nbsp;</o:p></div><div class=3D""><div =
style=3D"border-style: solid none none; border-top-width: 1pt; =
border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><b =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif;" class=3D"">From:</span></b><span style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D""><span =
class=3D"Apple-converted-space">&nbsp;</span>devel &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt;<span =
class=3D"Apple-converted-space">&nbsp;</span><b class=3D"">On Behalf =
Of<span class=3D"Apple-converted-space">&nbsp;</span></b>Lamasuta, =
Franck, Vodafone Automotive<br class=3D""><b class=3D"">Sent:</b><span =
class=3D"Apple-converted-space">&nbsp;</span>mercredi 17 juillet 2019 =
12:16<br class=3D""><b class=3D"">To:</b><span =
class=3D"Apple-converted-space">&nbsp;</span>Alexander Malysh &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt;<br class=3D""><b =
class=3D"">Cc:</b><span class=3D"Apple-converted-space">&nbsp;</span><a =
href=3D"mailto:[email protected]" class=3D"">[email protected]</a><br =
class=3D""><b class=3D"">Subject:</b><span =
class=3D"Apple-converted-space">&nbsp;</span>RE: [PATCH] http PUT =
requests<o:p class=3D""></o:p></span></div></div></div><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">I=E2=80=99m working on =
it=E2=80=A6<o:p class=3D""></o:p></span></div><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D""><o:p =
class=3D"">&nbsp;</o:p></span></div><div style=3D"margin: 0cm 0cm =
0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><o:p class=3D"">&nbsp;</o:p></div><div class=3D""><div =
style=3D"border-style: solid none none; border-top-width: 1pt; =
border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><b =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif;" class=3D"">From:</span></b><span style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D""><span =
class=3D"Apple-converted-space">&nbsp;</span>Alexander Malysh &lt;<a =
href=3D"mailto:[email protected]" style=3D"color: purple; =
text-decoration: underline;" class=3D"">[email protected]</a>&gt;<span =
class=3D"Apple-converted-space">&nbsp;</span><b class=3D"">On Behalf =
Of<span class=3D"Apple-converted-space">&nbsp;</span></b>Alexander =
Malysh<br class=3D""><b class=3D"">Sent:</b><span =
class=3D"Apple-converted-space">&nbsp;</span>vendredi 12 juillet 2019 =
15:01<br class=3D""><b class=3D"">To:</b><span =
class=3D"Apple-converted-space">&nbsp;</span>Lamasuta, Franck, Vodafone =
Automotive &lt;<a href=3D"mailto:[email protected]" =
style=3D"color: purple; text-decoration: underline;" =
class=3D"">[email protected]</a>&gt;<br class=3D""><b =
class=3D"">Cc:</b><span class=3D"Apple-converted-space">&nbsp;</span><a =
href=3D"mailto:[email protected]" style=3D"color: purple; =
text-decoration: underline;" class=3D"">[email protected]</a><br =
class=3D""><b class=3D"">Subject:</b><span =
class=3D"Apple-converted-space">&nbsp;</span>Re: [PATCH] http PUT =
requests<o:p class=3D""></o:p></span></div></div></div><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D"">Hi,<o:p class=3D""></o:p></div><div class=3D""><p =
class=3D"MsoNormal" style=3D"margin: 0cm 0cm 12pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;"><o:p =
class=3D"">&nbsp;</o:p></p><blockquote style=3D"margin-top: 5pt; =
margin-bottom: 5pt;" class=3D""><div class=3D""><div style=3D"margin: =
0cm 0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New =
Roman&quot;, serif;" class=3D"">Am 11.07.2019 um 14:24 schrieb Lamasuta, =
Franck, Vodafone Automotive &lt;<a =
href=3D"mailto:[email protected]" style=3D"color: purple; =
text-decoration: underline;" =
class=3D"">[email protected]</a>&gt;:<o:p =
class=3D""></o:p></div></div><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><o:p class=3D"">&nbsp;</o:p></div><div class=3D""><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">I thought again about it=E2=80=A6</span><o:p=
 class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">I guess you are =
concerned because the body of all POST or PUT requests would be =
parsed.</span><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">Of course this is bad!&nbsp;&nbsp;<span =
class=3D"apple-converted-space">&nbsp;</span></span><span =
style=3D"font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, =
125);" class=3D"">J</span><o:p =
class=3D""></o:p></div></div></div></blockquote><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div></div><div class=3D""><div style=3D"margin: =
0cm 0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New =
Roman&quot;, serif;" class=3D"">exactly...<o:p =
class=3D""></o:p></div></div><p class=3D"MsoNormal" style=3D"margin: 0cm =
0cm 12pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;"><o:p class=3D"">&nbsp;</o:p></p><blockquote style=3D"margin-top: =
5pt; margin-bottom: 5pt;" class=3D""><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">I think we have to check the value of the Content-Type =
header.</span><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">&nbsp;</span><o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">This is what we get from Micro =
Ocean:</span><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span lang=3D"FR" =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(0, 112, 192);" class=3D"">Content-Type: =
application/x-www-form-urlencoded</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span lang=3D"FR" style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=3D""><br=
 class=3D""></span><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Would it be ok to test =
this header before calling parse_cgivars() to parse the body?</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Do you have another =
idea?</span><o:p class=3D""></o:p></div></div></div></blockquote><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div></div><div class=3D""><div style=3D"margin: =
0cm 0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New =
Roman&quot;, serif;" class=3D"">This should work.<o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><o:p class=3D"">&nbsp;</o:p></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D"">Thanks,<o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D"">Alex<o:p class=3D""></o:p></div></div><p =
class=3D"MsoNormal" style=3D"margin: 0cm 0cm 12pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;"><o:p =
class=3D"">&nbsp;</o:p></p><blockquote style=3D"margin-top: 5pt; =
margin-bottom: 5pt;" class=3D""><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">&nbsp;</span><o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">Regards,</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Franck</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">&nbsp;</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D"">&nbsp;<o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"border-style: solid none none; =
border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: =
3pt 0cm 0cm;" class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm =
0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><b class=3D""><span style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D"">From:</span></b><span =
class=3D"apple-converted-space"><span style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D"">&nbsp;</span></span><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D"">devel &lt;<a href=3D"mailto:[email protected]" =
style=3D"color: purple; text-decoration: underline;" =
class=3D"">[email protected]</a>&gt;<span =
class=3D"apple-converted-space">&nbsp;</span><b class=3D"">On Behalf =
Of<span class=3D"apple-converted-space">&nbsp;</span></b>Lamasuta, =
Franck, Vodafone Automotive<br class=3D""><b class=3D"">Sent:</b><span =
class=3D"apple-converted-space">&nbsp;</span>jeudi 11 juillet 2019 =
12:06<br class=3D""><b class=3D"">To:</b><span =
class=3D"apple-converted-space">&nbsp;</span>Alexander Malysh &lt;<a =
href=3D"mailto:[email protected]" style=3D"color: purple; =
text-decoration: underline;" class=3D"">[email protected]</a>&gt;<br =
class=3D""><b class=3D"">Cc:</b><span =
class=3D"apple-converted-space">&nbsp;</span><a =
href=3D"mailto:[email protected]" style=3D"color: purple; =
text-decoration: underline;" class=3D"">[email protected]</a><br =
class=3D""><b class=3D"">Subject:</b><span =
class=3D"apple-converted-space">&nbsp;</span>RE: [PATCH] http PUT =
requests</span><o:p class=3D""></o:p></div></div></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D"">&nbsp;<o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Hi =
Alexander,</span><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">&nbsp;</span><o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">This is what http_accept_request() logs =
(with my patch) when Micro Ocean submits a DLR:</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">&nbsp;</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: =
&quot;Courier New&quot;; color: rgb(0, 112, 192);" class=3D"">2019-07-10 =
13:21:05 [5746] [7] DEBUG: HTTP: Got PUT request with =
url=3D'/MOcean-Kannel/DLR' and =
body=3D'mocean-from=3D33123456789&amp;mocean-to=3DMocean&amp;mocean-dlr-st=
atus=3D1&amp;mocean-msgid=3D0710212043806340&amp;mocean-error-code=3D0'</s=
pan><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">&nbsp;</span><o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">As you can see, the query variables are in =
the<span class=3D"apple-converted-space">&nbsp;</span><b =
class=3D"">body</b><span class=3D"apple-converted-space">&nbsp;</span>of =
the request. I think this is usual for a PUT (and for a =
POST).</span><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">To avoid code duplication, it seemed logical to slightly =
modify parse_cgivars() to parse the body.<br class=3D"">How would you =
manage this?</span><o:p class=3D""></o:p></div></div><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" =
class=3D"">&nbsp;</span><o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif; color: =
rgb(31, 73, 125);" class=3D"">Regards,</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">Franck</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif; color: rgb(31, 73, 125);" class=3D"">&nbsp;</span><o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D"">&nbsp;<o:p class=3D""></o:p></div></div><div =
class=3D""><div style=3D"border-style: solid none none; =
border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: =
3pt 0cm 0cm;" class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm =
0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D""><b class=3D""><span style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D"">From:</span></b><span =
class=3D"apple-converted-space"><span style=3D"font-size: 11pt; =
font-family: Calibri, sans-serif;" class=3D"">&nbsp;</span></span><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D"">Alexander Malysh &lt;<a href=3D"mailto:[email protected]" =
style=3D"color: purple; text-decoration: underline;" class=3D""><span =
style=3D"color: purple;" class=3D"">[email protected]</span></a>&gt;<span=
 class=3D"apple-converted-space">&nbsp;</span><b class=3D"">On Behalf =
Of<span class=3D"apple-converted-space">&nbsp;</span></b>Alexander =
Malysh<br class=3D""><b class=3D"">Sent:</b><span =
class=3D"apple-converted-space">&nbsp;</span>mardi 9 juillet 2019 =
08:42<br class=3D""><b class=3D"">To:</b><span =
class=3D"apple-converted-space">&nbsp;</span>Lamasuta, Franck, Vodafone =
Automotive &lt;<a href=3D"mailto:[email protected]" =
style=3D"color: purple; text-decoration: underline;" class=3D""><span =
style=3D"color: purple;" =
class=3D"">[email protected]</span></a>&gt;<br class=3D""><b =
class=3D"">Cc:</b><span class=3D"apple-converted-space">&nbsp;</span><a =
href=3D"mailto:[email protected]" style=3D"color: purple; =
text-decoration: underline;" class=3D""><span style=3D"color: purple;" =
class=3D"">[email protected]</span></a><br class=3D""><b =
class=3D"">Subject:</b><span =
class=3D"apple-converted-space">&nbsp;</span>Re: [PATCH] http PUT =
requests</span><o:p class=3D""></o:p></div></div></div></div><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D"">&nbsp;<o:p =
class=3D""></o:p></div></div><div class=3D""><div style=3D"margin: 0cm =
0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New Roman&quot;, =
serif;" class=3D"">Hi,<o:p class=3D""></o:p></div></div><div =
class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D"">&nbsp;<o:p class=3D""></o:p></div></div></div><div =
class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D"">sorry for delay. Patch would be ok if not this part where you =
parse body for post and put request<o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D"">as cgi vars. this is =
wrong. Please fix it and resubmit.<o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D"">&nbsp;<o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D"">Thanks,<o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D"">Alexander Malysh<o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D"">&nbsp;<o:p =
class=3D""></o:p></div></div><div class=3D""><p class=3D"MsoNormal" =
style=3D"margin: 0cm 0cm 12pt; font-size: 12pt; font-family: &quot;Times =
New Roman&quot;, serif;">&nbsp;<o:p class=3D""></o:p></p><blockquote =
style=3D"margin-top: 5pt; margin-bottom: 5pt;" class=3D""><div =
class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D"">Am 28.06.2019 um 10:58 schrieb Lamasuta, Franck, Vodafone =
Automotive &lt;<a href=3D"mailto:[email protected]" =
style=3D"color: purple; text-decoration: underline;" class=3D""><span =
style=3D"color: purple;" =
class=3D"">[email protected]</span></a>&gt;:<o:p =
class=3D""></o:p></div></div></div><div class=3D""><div style=3D"margin: =
0cm 0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New =
Roman&quot;, serif;" class=3D"">&nbsp;<o:p =
class=3D""></o:p></div></div><div class=3D""><div class=3D""><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
lang=3D"FR" style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D"">Hi list,</span><o:p class=3D""></o:p></div></div></div><div =
class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span lang=3D"FR" style=3D"font-size: 11pt; font-family: =
Calibri, sans-serif;" class=3D"">&nbsp;</span><o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif;" class=3D"">Here is a patch to =
allow inbound http PUT requests in generic http connector.<br =
class=3D"">It is required to implement Micro Ocean=E2=80=99s API for =
Delivery Reports:<span class=3D"apple-converted-space">&nbsp;</span><a =
href=3D"https://www.moceanapi.com/docs/#delivery-report" style=3D"color: =
purple; text-decoration: underline;" class=3D""><span style=3D"color: =
rgb(149, 79, 114);" =
class=3D"">https://www.moceanapi.com/docs/#delivery-report</span></a></spa=
n><o:p class=3D""></o:p></div></div></div><div class=3D""><div =
class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; =
font-family: &quot;Times New Roman&quot;, serif;" class=3D""><span =
style=3D"font-size: 11pt; font-family: Calibri, sans-serif;" =
class=3D"">&nbsp;</span><o:p class=3D""></o:p></div></div></div><div =
class=3D""><div class=3D""><div style=3D"margin: 0cm 0cm 0.0001pt; =
font-size: 12pt; font-family: &quot;Times New Roman&quot;, serif;" =
class=3D""><span style=3D"font-size: 11pt; font-family: Calibri, =
sans-serif;" class=3D"">Regards,</span><o:p =
class=3D""></o:p></div></div></div><div class=3D""><div class=3D""><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><span style=3D"font-size: =
11pt; font-family: Calibri, sans-serif;" class=3D"">Franck</span><o:p =
class=3D""></o:p></div></div></div><div class=3D""><div style=3D"margin: =
0cm 0cm 0.0001pt; font-size: 12pt; font-family: &quot;Times New =
Roman&quot;, serif;" class=3D"">&lt;http_put.patch&gt;<o:p =
class=3D""></o:p></div></div></div></blockquote></div><div class=3D""><div=
 style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D"">&nbsp;<o:p =
class=3D""></o:p></div></div></div></div></blockquote></div><div =
style=3D"margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: =
&quot;Times New Roman&quot;, serif;" class=3D""><o:p =
class=3D"">&nbsp;</o:p></div></div><span =
id=3D"cid:[email protected]">&lt;http_put-v2.=
patch&gt;</span><style class=3D"">ul[class*=3D'mb-extra__public-links'], =
ul[class*=3D'mb-note__public-links'], ul[class*=3D'mb-task__public-links']=
 { display: none !important; }</style></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_F3CCA1C6-6DCB-4691-ADCC-D09316593AB3--