@Override protected void formatMultipartHeader( final FormBodyPart part, final OutputStream out) throws IOException { // For strict, we output all fields with MIME-standard encoding. final Header header = part.getHeader(); for (final MinimalField field: header) { writeField(field, out); } }
break; default: form = new HttpStrictMultipart(charsetCopy, boundaryCopy, bodyPartsCopy);
break; default: form = new HttpStrictMultipart(charsetCopy, boundaryCopy, bodyPartsCopy);
@Override protected void formatMultipartHeader( final FormBodyPart part, final OutputStream out) throws IOException { // For strict, we output all fields with MIME-standard encoding. final Header header = part.getHeader(); for (final MinimalField field: header) { writeField(field, out); } }
MultipartFormEntity buildEntity() { final String st = subType != null ? subType : DEFAULT_SUBTYPE; final Charset cs = charset; final String b = boundary != null ? boundary : generateBoundary(); final List<FormBodyPart> bps = bodyParts != null ? new ArrayList<FormBodyPart>(bodyParts) : Collections.<FormBodyPart>emptyList(); final HttpMultipartMode m = mode != null ? mode : HttpMultipartMode.STRICT; final AbstractMultipartForm form; switch (m) { case BROWSER_COMPATIBLE: form = new HttpBrowserCompatibleMultipart(st, cs, b, bps); break; case RFC6532: form = new HttpRFC6532Multipart(st, cs, b, bps); break; default: form = new HttpStrictMultipart(st, cs, b, bps); } return new MultipartFormEntity(form, generateContentType(b, cs), form.getTotalLength()); }
@Override protected void formatMultipartHeader( final FormBodyPart part, final OutputStream out) throws IOException { // For strict, we output all fields with MIME-standard encoding. final Header header = part.getHeader(); for (final MinimalField field: header) { writeField(field, out); } }