guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Jumper (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (GUACAMOLE-44) Upload/download of files that are more than 1 GB fail
Date Mon, 08 Aug 2016 20:45:21 GMT

     [ https://issues.apache.org/jira/browse/GUACAMOLE-44?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Jumper updated GUACAMOLE-44:
------------------------------------
    Comment: was deleted

(was: Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/16#discussion_r65929193
  
    --- Diff: guacamole/src/main/java/org/apache/guacamole/tunnel/InterceptedStream.java ---
    @@ -0,0 +1,161 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.tunnel;
    +
    +import java.io.Closeable;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.protocol.GuacamoleStatus;
    +
    +/**
    + * A simple pairing of the index of an intercepted Guacamole stream with the
    + * stream-type object which will produce or consume the data sent over the
    + * intercepted Guacamole stream.
    + *
    + * @author Michael Jumper
    + * @param <T>
    + *     The type of object which will produce or consume the data sent over the
    + *     intercepted Guacamole stream. Usually, this will be either InputStream
    + *     or OutputStream.
    + */
    +public class InterceptedStream<T extends Closeable> {
    +
    +    /**
    +     * The index of the Guacamole stream being intercepted.
    +     */
    +    private final String index;
    +
    +    /**
    +     * The stream which will produce or consume the data sent over the
    +     * intercepted Guacamole stream.
    +     */
    +    private final T stream;
    +
    +    /**
    +     * The exception which prevented the stream from completing successfully,
    +     * if any. If the stream completed successfully, or has not encountered any
    +     * exception yet, this will be null.
    +     */
    +    private GuacamoleException streamError = null;
    +
    +    /**
    +     * Creates a new InterceptedStream which associated the given Guacamole
    +     * stream index with the given stream object.
    +     *
    +     * @param index
    +     *     The index of the Guacamole stream being intercepted.
    +     *
    +     * @param stream
    +     *     The stream which will produce or consume the data sent over the
    +     *     intercepted Guacamole stream.
    +     */
    +    public InterceptedStream(String index, T stream) {
    +        this.index = index;
    +        this.stream = stream;
    +    }
    +
    +    /**
    +     * Returns the index of the Guacamole stream being intercepted.
    +     *
    +     * @return
    +     *     The index of the Guacamole stream being intercepted.
    +     */
    +    public String getIndex() {
    +        return index;
    +    }
    +
    +    /**
    +     * Returns the stream which will produce or consume the data sent over the
    +     * intercepted Guacamole stream.
    +     *
    +     * @return
    +     *     The stream which will produce or consume the data sent over the
    +     *     intercepted Guacamole stream.
    +     */
    +    public T getStream() {
    +        return stream;
    +    }
    +
    +    /**
    +     * Reports that this InterceptedStream did not complete successfully due to
    +     * the given GuacamoleException, which could not be thrown at the time due
    +     * to asynchronous handling of the stream contents.
    +     *
    +     * @param streamError
    +     *     The exception which prevented the stream from completing
    +     *     successfully.
    +     */
    +    public void setStreamError(GuacamoleException streamError) {
    +        this.streamError = streamError;
    +    }
    +
    +    /**
    +     * Reports that this InterceptedStream did not complete successfully due to
    +     * an error described by the given status code and human-readable message.
    +     * The error reported by this call can later be retrieved as a
    +     * GuacamoleStreamException by calling getStreamError().
    --- End diff --
    
    It's just a `GuacamoleException`, but the subclass of `GuacamoleException` that will be
set due to an invocation of this function will be `GuacamoleStreamException`.
)

> Upload/download of files that are more than 1 GB fail
> -----------------------------------------------------
>
>                 Key: GUACAMOLE-44
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-44
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole
>            Reporter: Michael Jumper
>            Assignee: Michael Jumper
>             Fix For: 0.9.10-incubating
>
>
> {panel:bgColor=#FFFFEE}
> *The description of this issue was copied from [GUAC-784|https://glyptodon.org/jira/browse/GUAC-784],
an issue in the JIRA instance used by the Guacamole project prior to its acceptance into the
Apache Incubator.*
> Comments, attachments, related issues, and history from prior to acceptance *have not
been copied* and can be found instead at the original issue.
> {panel}
> From Chrome, after attempting upload of a file greater than 1 GB in size:
> {code:none}
> Uncaught TypeError: Cannot read property 'length' of null client-ui.js:1525
> _upload_file.reader.onloadend
> {code}
> Uploading this file via Firefox simply crashes the browser. The same issue will occur
for file downloads, as Guacamole always creates the entire file in memory before starting
the transfer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message