]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5682 revert
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 8 Aug 2013 15:31:17 +0000 (20:31 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 8 Aug 2013 17:55:13 +0000 (22:55 +0500)
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_media.c

index 6a40b1de63bce47a728e8b6277a17b522e993963..da0cd3deac2a45bc6138630f64e25e31ebbb3325 100644 (file)
@@ -8437,13 +8437,15 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
                for (mp = sip->sip_multipart; mp; mp = mp->mp_next) {
                        if (mp->mp_payload && mp->mp_payload->pl_data && mp->mp_content_type && mp->mp_content_type->c_type) {
                                char *name = switch_core_session_strdup(session, mp->mp_content_type->c_type);
-                               char *encoded_name;
-                               int len = (strlen(name) * 3) + 1;
-                               
-                               encoded_name = switch_core_session_alloc(session, len);
-                               switch_url_encode(name, encoded_name, len);
+                               char *p;
+
+                               for (p = name; p && *p; p++) {
+                                       if (*p == '/') {
+                                               *p = '_';
+                                       }
+                               }
                                
-                               switch_channel_set_variable_name_printf(channel, mp->mp_payload->pl_data, SOFIA_MULTIPART_PREFIX "_enc_%s", encoded_name);
+                               switch_channel_set_variable_name_printf(channel, mp->mp_payload->pl_data, SOFIA_MULTIPART_PREFIX "%s", name);
                        }
                }
        }
index 280af38cefb0e146f336bbaa243328164a687bb3..87a4dc7eb589e615725e2ea9ab9a7a4093ded8b0 100644 (file)
@@ -115,13 +115,6 @@ char *sofia_media_get_multipart(switch_core_session_t *session, const char *pref
 
                        if (!strncasecmp(name, prefix, strlen(prefix))) {
                                const char *hname = name + strlen(prefix);
-
-                               if (*hname == '_' && strncmp(hname, "_enc_", 4)) {
-                                       char *dname = switch_core_session_strdup(session, hname);
-                                       switch_url_decode(dname);
-                                       hname = dname;
-                               }
-
                                if (*value == '~') {
                                        stream.write_function(&stream, "--%s\nContent-Type: %s\nContent-Length: %d\n%s\n", boundary, hname, strlen(value), value + 1);
                                } else {