Attribute() — netty Function Reference
Architecture documentation for the Attribute() function in HttpPostMultipartRequestDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 71987748_22e4_693e_beb9_7ae7bf8fce5d["Attribute()"] d07408ef_0ab6_54bb_c64e_0b5b9a0aac25["HttpPostMultipartRequestDecoder"] 71987748_22e4_693e_beb9_7ae7bf8fce5d -->|defined in| d07408ef_0ab6_54bb_c64e_0b5b9a0aac25 style 71987748_22e4_693e_beb9_7ae7bf8fce5d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java lines 856–882
private Attribute getContentDispositionAttribute(String... values) {
String name = cleanString(values[0]);
String value = values[1];
// Filename can be token, quoted or encoded. See https://tools.ietf.org/html/rfc5987
if (HttpHeaderValues.FILENAME.contentEquals(name)) {
// Value is quoted or token. Strip if quoted:
int last = value.length() - 1;
if (last > 0 &&
value.charAt(0) == HttpConstants.DOUBLE_QUOTE &&
value.charAt(last) == HttpConstants.DOUBLE_QUOTE) {
value = value.substring(1, last);
}
} else if (FILENAME_ENCODED.equals(name)) {
try {
name = HttpHeaderValues.FILENAME.toString();
String[] split = cleanString(value).split("'", 3);
value = QueryStringDecoder.decodeComponent(split[2], Charset.forName(split[0]));
} catch (ArrayIndexOutOfBoundsException | UnsupportedCharsetException e) {
throw new ErrorDataDecoderException(e);
}
} else {
// otherwise we need to clean the value
value = cleanString(value);
}
return factory.createAttribute(request, name, value);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Attribute() do?
Attribute() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java.
Where is Attribute() defined?
Attribute() is defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java at line 856.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free