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

2013-09-01 Thread Alexander Malysh
Hi,

how did you send your request, example URL please.

Make sure you send meta_data as follow:

sendsms?meta_data=URLENCODED(?group?key=URLENCODED(value))...

Alex

Am 31.08.2013 um 02:40 schrieb Germán Bobr - Redmond Software 
german.b...@redmondsoftware.com:

 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
 german.b...@redmondsoftware.com
 image001.png
  



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

2013-08-30 Thread Germán Bobr - Redmond Software
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:german.b...@redmondsoftware.com german.b...@redmondsoftware.com

Description: redmond

 

image001.png