- Bug fix, failure when x-wap-profile header missing
This commit is contained in:
parent
feeb8ab13c
commit
cfa26d3c75
|
@ -131,11 +131,12 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Get the profile URL and store it. Has effect of fetching if missing. */
|
/* Get the profile URL and store it. Has effect of fetching if missing. */
|
||||||
if ((h.profile_url = http_header_value(h.headers,
|
if ((h.profile_url = http_header_value(h.headers,
|
||||||
octstr_imm("X-Wap-Profile"))) == NULL)
|
octstr_imm("X-Wap-Profile"))) == NULL)
|
||||||
h.profile_url = http_header_value(h.headers, octstr_imm("Profile"));
|
h.profile_url = http_header_value(h.headers, octstr_imm("Profile"));
|
||||||
|
|
||||||
octstr_strip_nonalphanums(h.profile_url);
|
if (h.profile_url)
|
||||||
|
octstr_strip_nonalphanums(h.profile_url);
|
||||||
|
|
||||||
/* Get the sender address. */
|
/* Get the sender address. */
|
||||||
h.base_client_addr = mms_find_sender_msisdn(h.url,
|
h.base_client_addr = mms_find_sender_msisdn(h.url,
|
||||||
h.ip,
|
h.ip,
|
||||||
|
@ -252,7 +253,8 @@ void fetchmms_proxy(MmsHTTPClientInfo *h)
|
||||||
prof = mms_get_ua_profile(octstr_get_cstr(h->profile_url));
|
prof = mms_get_ua_profile(octstr_get_cstr(h->profile_url));
|
||||||
if (!prof)
|
if (!prof)
|
||||||
prof = mms_make_ua_profile(h->headers);
|
prof = mms_make_ua_profile(h->headers);
|
||||||
}
|
} else
|
||||||
|
prof = mms_make_ua_profile(h->headers);
|
||||||
|
|
||||||
if (loc == MMS_LOC_MQUEUE) { /* where is the message? */
|
if (loc == MMS_LOC_MQUEUE) { /* where is the message? */
|
||||||
e = mms_queue_readenvelope(octstr_get_cstr(qf),
|
e = mms_queue_readenvelope(octstr_get_cstr(qf),
|
||||||
|
|
Loading…
Reference in New Issue