|
|
|
@ -2922,7 +2922,8 @@ void get_content_from_sendmms_request(Octstr *body, List *headers, List *cgivars
|
|
|
|
|
Octstr *reply = NULL, *params = NULL;
|
|
|
|
|
|
|
|
|
|
http_header_add(reqh, "User-Agent", MM_NAME "/" VERSION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*ctype = NULL;
|
|
|
|
|
if (mms_url_fetch_content(HTTP_METHOD_GET, s, reqh, NULL, &rph, &reply) == HTTP_OK)
|
|
|
|
|
get_content_type(rph, ctype, ¶ms);
|
|
|
|
|
else
|
|
|
|
@ -2935,7 +2936,8 @@ void get_content_from_sendmms_request(Octstr *body, List *headers, List *cgivars
|
|
|
|
|
http_destroy_headers(reqh);
|
|
|
|
|
http_destroy_headers(*rh);
|
|
|
|
|
*rh = rph ? rph : http_create_empty_headers(); /* replace as real reply headers. */
|
|
|
|
|
*ctype = http_header_value(*rh, octstr_imm("Content-Type"));
|
|
|
|
|
if (*ctype == NULL)
|
|
|
|
|
*ctype = http_header_value(*rh, octstr_imm("Content-Type"));
|
|
|
|
|
octstr_destroy(params);
|
|
|
|
|
} else if ((s = http_cgi_variable(cgivars, "content")) != NULL) { /* any content. */
|
|
|
|
|
Octstr *_xctype = NULL; /* ... because cgi var stuff is destroyed elsewhere, we must dup it !! */
|
|
|
|
|