src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java

Print this page
rev 472 : 8036030: Update JAX-WS RI integration to latest version

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 116,131 **** --- 116,133 ---- if (msg == null) { return null; } ContentTypeImpl ctImpl = (ContentTypeImpl)getStaticContentType(packet); String boundary = ctImpl.getBoundary(); + String rootId = ctImpl.getRootId(); boolean hasAttachments = (boundary != null); Codec rootCodec = getMimeRootCodec(packet); if (hasAttachments) { writeln("--"+boundary, out); ContentType ct = rootCodec.getStaticContentType(packet); String ctStr = (ct != null) ? ct.getContentType() : rootCodec.getMimeType(); + if (rootId != null) writeln("Content-ID: " + rootId, out); writeln("Content-Type: " + ctStr, out); writeln(out); } ContentType primaryCt = rootCodec.encode(packet, out);