Fixed NETTY-397, NETTY-398, NETTY-399, NETTY-403

This commit is contained in:
fredericBregier 2011-06-04 16:03:48 +02:00 committed by Trustin Lee
parent dd1ff8d9cc
commit 45a7692f07
4 changed files with 16 additions and 3 deletions

View File

@ -15,6 +15,7 @@
*/
package org.jboss.netty.handler.codec.http;
import java.io.File;
import java.nio.charset.Charset;
/**
@ -156,7 +157,8 @@ public class DiskFileUpload extends AbstractDiskHttpData implements FileUpload {
@Override
protected String getDiskFilename() {
return filename;
File file = new File(filename);
return file.getName();
}
@Override

View File

@ -74,7 +74,7 @@ public class MixedAttribute implements Attribute {
DiskAttribute diskAttribute = new DiskAttribute(attribute
.getName());
diskAttribute.addContent(((MemoryAttribute) attribute)
.getChannelBuffer(), false);
.getChannelBuffer(), last);
attribute = diskAttribute;
}
}

View File

@ -63,7 +63,7 @@ public class MixedFileUpload implements FileUpload {
.getContentTransferEncoding(), fileUpload.getCharset(),
definedSize);
diskFileUpload.addContent(((MemoryFileUpload) fileUpload)
.getChannelBuffer(), false);
.getChannelBuffer(), last);
fileUpload = diskFileUpload;
}
}

View File

@ -167,6 +167,17 @@ public abstract class CIDR implements Comparable<CIDR>
*/
public abstract boolean contains(InetAddress inetAddress);
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object arg0) {
if (!(arg0 instanceof CIDR)) {
return false;
}
return (this.compareTo((CIDR) arg0) == 0);
}
/** Convert an IPv4 or IPv6 textual representation into an
* InetAddress.
* @param addr