**>From: "Willy Mularto" <[EMAIL PROTECTED]>
**>To: <users@kannel.org>
**>Subject: reply: 500 Server encountered an internal error. with 1.3.2
**>Date: Tue, 4 Jan 2005 13:31:00 +0700
**>
**>Guys,
**>I got this error message from smsbox-access.log
**>SMS HTTP-request sender:+628559000xx request: Koneksi Error' url: 
**>'http://1.2.3.4/logic/?msisdn=%2B6285590001xx&msg=test' reply: 500 'Server 
**>encountered an internal error.'
**>But if I hit the URL via browser then the sms delivered, there is no error 
**>500, what's going on?

It appears that the application on the other side of your get-url
is interpreting the '+' (%2B) in front of he phone number as a space
character and does not know how to handle the situation when there
is a space between the 'msisdn=' and the phone number.

You can do one of the following:
 - Strip out the '+' in front of the phone numbers before sending
   it using get-url via:
     unified-prefix = "-,+"
   in either your 'group = core' or 'group = smsc' section.
 - Use post-url and modify your application to expect the CGI
   variables to be sent to it via stdin. Then have your application
   understand that "msisdn= 6285590001xx" is really
   "msisdn=+6285590001xx".
 - Make your "logic" program understand that the command line
   argument:
     msisdn= 6285590001xx&msg=test
   is really:
     msisdn=+6285590001xx&msg=test

My opinion would be to do the post-url since that would prevent
someone from forcing your "logic" application from executing arbitrary
commands. What happens when your logic application is called by the
following URLs:
  (if UNIX system)
  http://1.2.3.4/logic/?msisdn=%3Becho%2BHello%3E%2Ffile.txt
  (if Windows system)
  http://1.2.3.4/logic/?msisdn=%3Becho%2BHello%3E%5Cfile.txt
Do you get a file in your toplevel directory with the content of "Hello"?

See ya...

d.c.

Reply via email to