Proposed changes in gwlib/http.c to fix a meta_data issue

Germán Bobr - Redmond Software <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hello!

 

Using send-sms cgi to send messages with message_payload tlv i found out I
couldn’t send characters like ‘?’ and ‘&’ even when I was encoding them as
%26 and %3F

 

I’d never messed with kannel sources before, but looking at it I found that
the problem was because of parse_cgivars function in gwlib/http.c doing an
octstr_url_decode for all values in the request.

 

I know it’s not a pretty solution but I changed this to make it work:

 

On gwlib/http.c lines 2553 where code reads:

octstr_url_decode(v->name);

octstr_url_decode(v->value);

 

I changed it for:

octstr_url_decode(v->name);   

if(octstr_str_compare(v->name,"meta-data"))

       octstr_url_decode(v->value);

 

 

Does anyone have a better idea on how to fix the issue?

Should I make a patch for this?

 

Thank you

 

Germán Bobr
 <mailto:[email protected]> [email protected]

Description: redmond
image001.png (image/png, 10.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.