Fixed NETTY-397, NETTY-398, NETTY-399, NETTY-403
This commit is contained in:
parent
dd1ff8d9cc
commit
45a7692f07
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class MixedFileUpload implements FileUpload {
|
||||
.getContentTransferEncoding(), fileUpload.getCharset(),
|
||||
definedSize);
|
||||
diskFileUpload.addContent(((MemoryFileUpload) fileUpload)
|
||||
.getChannelBuffer(), false);
|
||||
.getChannelBuffer(), last);
|
||||
fileUpload = diskFileUpload;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user