Re: Proposed Patches for META-DATA branch.
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Michael Zervakis schrieb:
>
>
> Alexander Malysh wrote:
>>
>> >Michael Zervakis schrieb:
>>
>> >> Dear all,
>>
>> >>
>> >> During testing of cvs-20081021 meta-data branch we found two
>> issues:
>>
>> >> 1. The meta_data_pack() always appends an "&" at the end of the
>>
>> >> resulting string. As a result sms.meta_data always contains an "&" at
>>
>> >> the end, which produces queries like the following:
>>
>> >> DEBUG: Query:
>>
>> >> sms_source=%2B999999999&sms_dest=9999&smsc-id=smsc&sms_command=test&me
>>
>> >> ta_data=%3Fsmpp%3Fmessage_reference%3D192%26
>>
>> >
>> >I don't see this as a issue. Why it should be a problem?
>>
> Since it doesn't serve a purpose (maybe I'm wrong here) why should a "&"
> be appended at the end? I thought it was better to change
> meta_data_pack() instead of adjusting the sms-service endpoint to strip
> the trailing "&"
IMHO it's equal whether you have or not & at the end. Why do you need to
strip & if it's used to parse values (e.g. metada_value.split('&'))...
>>
>> >
>> >>
>> > >
>>
>> > >2. When using post-xml sms.meta_data is not urlencoded resulting in an
>>
>> >> unreadable XML file like this <meta-data>?smpp?tag=1&</meta-data>.
>>
>> >
>> >You are right, but your fix is wrong because this can happens to any
>> value in xml. See attached patch that should fix this issue.
>>
> You're right. Thanks for the patch.
>>
>> >
>> >>
>> >> Regards,
>>
>> >> Mike Zervakis
>>
>> >>
>
>