yaxim-org / yaxim

yaxim - a lean XMPP/Jabber client for Android
https://yaxim.org
GNU General Public License v3.0
486 stars 238 forks source link

HTTP Upload headers not used #274

Open Zash opened 3 years ago

Zash commented 3 years ago
C:
<iq to='share.example.net' id='y6mO8-120' type='get'>
  <request xmlns='urn:xmpp:http:upload:0' filename='IMG_20210129_012916.jpg' size='199871' content-type='image/jpeg'/>
</iq>

S:
<iq id="y6mO8-120" to="zash@example.net/yaxim.859C45FD" type="result" from="share.example.net">
  <slot xmlns="urn:xmpp:http:upload:0">
    <get url="https://share.example.net/file_share/o35x3G_omPCeWzZw/IMG_20210129_012916.jpg"/>
    <put url="https://share.example.net/file_share/o35x3G_omPCeWzZw/IMG_20210129_012916.jpg">
      <header name="Authorization">Bearer u3y6RZrNvRAkgKZT_Yge</header>
    </put>
  </slot>
</iq>

On upload the HTTP PUT request is missing the Authorization header.

Support for headers is mandatory

[...] the client MUST include all allowed headers that came with the slot assignment.