MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / getHeaders

Method getHeaders

src/tsd/AbstractHttpQuery.java:155–168  ·  view source on GitHub ↗

Copies the header list so modifications won't affect the original set. Note that it flattens duplicate headers keys as comma separated lists per the RFC @return The full set of headers for this query

()

Source from the content-addressed store, hash-verified

153 * @return The full set of headers for this query
154 */
155 public Map<String, String> getHeaders() {
156 final Map<String, String> headers = new HashMap<String, String>(
157 request.headers().entries().size());
158 for (final Entry<String, String> header : request.headers().entries()) {
159 // http://tools.ietf.org/html/rfc2616#section-4.2
160 if (headers.containsKey(header.getKey())) {
161 headers.put(header.getKey(),
162 headers.get(header.getKey()) + "," + header.getValue());
163 } else {
164 headers.put(header.getKey(), header.getValue());
165 }
166 }
167 return headers;
168 }
169
170 /**
171 * Return the value of the given HTTP Header

Callers 1

executeMethod · 0.80

Calls 5

putMethod · 0.80
sizeMethod · 0.65
getKeyMethod · 0.45
getMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected