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;
|
package org.jboss.netty.handler.codec.http;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -156,7 +157,8 @@ public class DiskFileUpload extends AbstractDiskHttpData implements FileUpload {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getDiskFilename() {
|
protected String getDiskFilename() {
|
||||||
return filename;
|
File file = new File(filename);
|
||||||
|
return file.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -74,7 +74,7 @@ public class MixedAttribute implements Attribute {
|
|||||||
DiskAttribute diskAttribute = new DiskAttribute(attribute
|
DiskAttribute diskAttribute = new DiskAttribute(attribute
|
||||||
.getName());
|
.getName());
|
||||||
diskAttribute.addContent(((MemoryAttribute) attribute)
|
diskAttribute.addContent(((MemoryAttribute) attribute)
|
||||||
.getChannelBuffer(), false);
|
.getChannelBuffer(), last);
|
||||||
attribute = diskAttribute;
|
attribute = diskAttribute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public class MixedFileUpload implements FileUpload {
|
|||||||
.getContentTransferEncoding(), fileUpload.getCharset(),
|
.getContentTransferEncoding(), fileUpload.getCharset(),
|
||||||
definedSize);
|
definedSize);
|
||||||
diskFileUpload.addContent(((MemoryFileUpload) fileUpload)
|
diskFileUpload.addContent(((MemoryFileUpload) fileUpload)
|
||||||
.getChannelBuffer(), false);
|
.getChannelBuffer(), last);
|
||||||
fileUpload = diskFileUpload;
|
fileUpload = diskFileUpload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,6 +167,17 @@ public abstract class CIDR implements Comparable<CIDR>
|
|||||||
*/
|
*/
|
||||||
public abstract boolean contains(InetAddress inetAddress);
|
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
|
/** Convert an IPv4 or IPv6 textual representation into an
|
||||||
* InetAddress.
|
* InetAddress.
|
||||||
* @param addr
|
* @param addr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user