/** * <p> Parses the <code>header-part</code> and returns as key/value * pairs. * * <p> If there are multiple headers of the same names, the name * will map to a comma-separated list containing the values. * * @param headerPart The <code>header-part</code> of the current * <code>encapsulation</code>. * * @return A <code>Map</code> containing the parsed HTTP request headers. * @deprecated 1.2.1 Use {@link #getParsedHeaders(String)} */ @Deprecated protected Map<String, String> parseHeaders(String headerPart) { FileItemHeaders headers = getParsedHeaders(headerPart); Map<String, String> result = new HashMap<String, String>(); for (Iterator<String> iter = headers.getHeaderNames(); iter.hasNext();) { String headerName = iter.next(); Iterator<String> iter2 = headers.getHeaders(headerName); StringBuilder headerValue = new StringBuilder(iter2.next()); while (iter2.hasNext()) { headerValue.append(",").append(iter2.next()); } result.put(headerName, headerValue.toString()); } return result; }
continue; FileItemHeaders headers = getParsedHeaders(multi.readHeaders()); if (currentFieldName == null) {
/** * <p> Parses the <code>header-part</code> and returns as key/value * pairs. * * <p> If there are multiple headers of the same names, the name * will map to a comma-separated list containing the values. * * @param headerPart The <code>header-part</code> of the current * <code>encapsulation</code>. * * @return A <code>Map</code> containing the parsed HTTP request headers. * @deprecated 1.2.1 Use {@link #getParsedHeaders(String)} */ @Deprecated protected Map<String, String> parseHeaders(String headerPart) { FileItemHeaders headers = getParsedHeaders(headerPart); Map<String, String> result = new HashMap<String, String>(); for (Iterator<String> iter = headers.getHeaderNames(); iter.hasNext();) { String headerName = iter.next(); Iterator<String> iter2 = headers.getHeaders(headerName); StringBuilder headerValue = new StringBuilder(iter2.next()); while (iter2.hasNext()) { headerValue.append(",").append(iter2.next()); } result.put(headerName, headerValue.toString()); } return result; }
/** * <p> Parses the <code>header-part</code> and returns as key/value * pairs. * * <p> If there are multiple headers of the same names, the name * will map to a comma-separated list containing the values. * * @param headerPart The <code>header-part</code> of the current * <code>encapsulation</code>. * * @return A <code>Map</code> containing the parsed HTTP request headers. * @deprecated 1.2.1 Use {@link #getParsedHeaders(String)} */ @Deprecated protected Map<String, String> parseHeaders(String headerPart) { FileItemHeaders headers = getParsedHeaders(headerPart); Map<String, String> result = new HashMap<String, String>(); for (Iterator<String> iter = headers.getHeaderNames(); iter.hasNext();) { String headerName = iter.next(); Iterator<String> iter2 = headers.getHeaders(headerName); StringBuilder headerValue = new StringBuilder(iter2.next()); while (iter2.hasNext()) { headerValue.append(",").append(iter2.next()); } result.put(headerName, headerValue.toString()); } return result; }
/** * <p> Parses the <code>header-part</code> and returns as key/value * pairs. * * <p> If there are multiple headers of the same names, the name * will map to a comma-separated list containing the values. * * @param headerPart The <code>header-part</code> of the current * <code>encapsulation</code>. * * @return A <code>Map</code> containing the parsed HTTP request headers. * @deprecated Use {@link #getParsedHeaders(String)} */ protected Map /* String, String */ parseHeaders(String headerPart) { FileItemHeaders headers = getParsedHeaders(headerPart); Map result = new HashMap(); for (Iterator iter = headers.getHeaderNames(); iter.hasNext();) { String headerName = (String) iter.next(); Iterator iter2 = headers.getHeaders(headerName); String headerValue = (String) iter2.next(); while (iter2.hasNext()) { headerValue += "," + iter2.next(); } result.put(headerName, headerValue); } return result; }
continue; FileItemHeaders headers = getParsedHeaders(multi.readHeaders()); if (currentFieldName == null) {
continue; FileItemHeaders headers = getParsedHeaders(multi.readHeaders()); if (currentFieldName == null) {
continue; FileItemHeaders headers = getParsedHeaders(multi.readHeaders()); if (currentFieldName == null) {