Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Flood doesn't handle the "fault" tag in the XMLRPC response body #840

Open
3 tasks done
wheelerlaw opened this issue Sep 26, 2019 · 0 comments
Open
3 tasks done

Flood doesn't handle the "fault" tag in the XMLRPC response body #840

wheelerlaw opened this issue Sep 26, 2019 · 0 comments
Labels

Comments

@wheelerlaw
Copy link

wheelerlaw commented Sep 26, 2019

Type: Bug Report

  • Try to follow the update procedure described in the README and try again before opening this issue.
  • Please check the F.A.Q..
  • Please check the Troubleshooting wiki section.

Your Environment

  • Version used:
  • Environment name and version:
    • Node.js version: 10.16.3
    • npm version 6.9.0
    • Web browser Firefox 68.0
  • Operating System and version:
    • Fedora 29, Linux 5.2.7

Summary

So when one submits a .torrent file that exceeds the XMLRPC filesize limits, rtorrent returns a response that includes a <fault>...</fault> block. The rtorrentDeserializer doesn't handle this block and throws an exception, swallowing the original error message.

Example response:

 Status: 200 OK
Content-Type: text/xml
Content-Length: 372

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
<value><struct>
<member><name>faultCode</name>
<value><i4>-503</i4></value></member>
<member><name>faultString</name>
<value><string>Call XML not a proper XML-RPC call.  XML-RPC request too large.  Max allowed is 524288 bytes</string></value></member>
</struct></value>
</fault>
</methodResponse>

Expected Behavior

It would be nice for the original error message from the <fault>...</fault> block be passed onto the client.

Current Behavior

The rtorrentDeserializer doesn't handle fault block, and returns an exception and swallows the original error message and fault code returned from rtorrent.

This results on the add files button to keep spinning and spinning.

Possible Solution

See PR: #841

Steps to Reproduce

Assuming a working setup of rtorrent and Flood (and rtorrent with the default XMLRPC filesize limits—524288 bytes on the latest master), try to upload a torrent that is larger than that size.

Context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants