View | Details | Raw Unified | Return to bug 48726
Collapse All | Expand All

(-)DeployTask.java (-3 / +11 lines)
Lines 137-143 Link Here
137
     *
137
     *
138
     * @exception BuildException if an error occurs
138
     * @exception BuildException if an error occurs
139
     */
139
     */
140
    public void execute() throws BuildException {
140
    @Override
141
	public void execute() throws BuildException {
141
142
142
        super.execute();
143
        super.execute();
143
        if (path == null) {
144
        if (path == null) {
Lines 166-173 Link Here
166
                }
167
                }
167
            } else {
168
            } else {
168
                try {
169
                try {
169
                    stream = new BufferedInputStream
170
                    FileInputStream fsInput = new FileInputStream(war);
170
                        (new FileInputStream(war), 1024);
171
                    long size = fsInput.getChannel().size();
172
173
                    if (size > Integer.MAX_VALUE)
174
                        throw new UnsupportedOperationException("DeployTask does not support WAR files greater than 2 Gb");
175
                    contentLength = (int) size;
176
177
                    stream = new BufferedInputStream(fsInput, 1024);
178
171
                } catch (IOException e) {
179
                } catch (IOException e) {
172
                    throw new BuildException(e);
180
                    throw new BuildException(e);
173
                }
181
                }
(-)AbstractCatalinaTask.java (+2 lines)
Lines 185-190 Link Here
185
                if (contentLength >= 0) {
185
                if (contentLength >= 0) {
186
                    hconn.setRequestProperty("Content-Length",
186
                    hconn.setRequestProperty("Content-Length",
187
                                             "" + contentLength);
187
                                             "" + contentLength);
188
                    
189
                    hconn.setFixedLengthStreamingMode(contentLength);
188
                }
190
                }
189
            } else {
191
            } else {
190
                hconn.setDoOutput(false);
192
                hconn.setDoOutput(false);

Return to bug 48726