Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.x-1.1, 7.x-1.2, 7.x-1.3, 7.x-1.4, 7.x-1.5, 7.x-1.6, 7.x-1.7, 7.x-1.8
    • Fix Version/s: None
    • Component/s: Tuque API
    • Labels:
      None

      Description

      Validate files to write are writable in Tuque, so as to avoid potential memory issues.

      Presently, if Tuque is passed a filename to which it cannot write in HttpConnection::getRequest(), it will continue to perform the request as if it was not passed a file... If dealing with large responses, this could exceed memory limitations. Additionally, code expecting the file to be written is not likely to work correctly should the response be returned into memory.

      Let's fail faster, immediately when the attempt to open the file for writing fails.

      It is not possible to depend on the HTTP error code, since it continues to make the request as if $file were not passed.

      Steps to Reproduce

      Attempt to download a datastream to a non-writable path, using Datastream::getContent().

      Presently, this throws warnings but continues to make the request.

      Test Case

      Following the steps to reproduce, the request should not be made when passed an invalid argument.


      Adam Vessey
      Developer
      discoverygarden inc. | Managing Digital Content

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                adam.vessey Adam Vessey
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: