diff options
| -rw-r--r-- | cloudinit/user_data.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/cloudinit/user_data.py b/cloudinit/user_data.py index f9f84030..803ffc3a 100644 --- a/cloudinit/user_data.py +++ b/cloudinit/user_data.py @@ -84,6 +84,12 @@ class UserDataProcessor(object):              if ctype is None:                  ctype = ctype_orig +            if ctype != ctype_orig: +                if CONTENT_TYPE in part: +                    part.replace_header(CONTENT_TYPE, ctype) +                else: +                    part[CONTENT_TYPE] = ctype +              if ctype in INCLUDE_TYPES:                  self._do_include(payload, append_msg)                  continue @@ -92,6 +98,8 @@ class UserDataProcessor(object):                  self._explode_archive(payload, append_msg)                  continue +            # Should this be happening, shouldn't +            # the part header be modified and not the base?              if CONTENT_TYPE in base_msg:                  base_msg.replace_header(CONTENT_TYPE, ctype)              else: | 
