I'm using PHP with CURL as my carrier. [HTTP/1.1 403 Forbidden Server: Kannel/1.4.1 Content-Length: 32 Content-type: text/html Pragma: no-cache Cache-Control: no-cache Authorization failed for sendsms]
This the header returned. after these $ci = curl_init() or die(curl_error()); curl_setopt($ci, CURLOPT_PORT, 13993); curl_setopt($ci, CURLOPT_HEADER, 1); curl_setopt($ci, CURLOPT_URL, $url); curl_setopt($ci, CURLOPT_USERPWD, "user:foobar"); curl_setopt($ci, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ci, CURLOPT_TIMEOUT, 300); curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ci, CURLOPT_POST, 1); curl_setopt($ci, CURLOPT_HTTPHEADER, $plain_header); Regards, Mike Nwaogu Tel: 234_802_325_6437 Eml: as_u_ca...@d.top ________________________________ From: Nikos Balkanas <nbalka...@gmail.com> To: Mike Nwaogu <michael_nwa...@yahoo.com>; Alejandro Guerrieri <alejandro.guerri...@gmail.com> Cc: users@kannel.org Sent: Tuesday, January 13, 2009 7:21:27 PM Subject: Re: Invalid content type error How about this? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> It would be helpful if you print all of your headers, not just excerpts. BR, Nikos ----- Original Message ----- From: Mike Nwaogu To: Nikos Balkanas ; Alejandro Guerrieri Cc: users@kannel.org Sent: Tuesday, January 13, 2009 6:42 PM Subject: Re: Invalid content type error Ok thanks, what's the best header to send in. "Content-Type: text/html; charset=utf-8" or "Content-Type: text/html; charset=iso-8859-1" Do I need to config kannel to expect a particular type, I noticed that every time I send a request with the either header above I have a PANIC in the logs and the process dies. Regards, Mike Nwaogu Tel: 234_802_325_6437 ________________________________ From: Nikos Balkanas <nbalka...@gmail.com> To: Mike Nwaogu <michael_nwa...@yahoo.com>; Alejandro Guerrieri <alejandro.guerri...@gmail.com> Cc: users@kannel.org Sent: Friday, January 2, 2009 6:18:52 PM Subject: Re: Invalid content type error Hi Mike, Kannel is very explicit about its problem. The HTML header "Content-type" you are submitting with your javascript (or more likely don't send at all) is invalid. The header of course is not part of the URL which seems to be OK. You can see the headers you are sending to kannel either by a packet analyzer like tcpdump, or by starting bearerbox and smsbox at the shell at maximum verbosity: bearerbox <conffile>& smsbox <conffile> & BR, Nikos ----- Original Message ----- From: Mike Nwaogu To: Alejandro Guerrieri Cc: users@kannel.org Sent: Friday, January 02, 2009 7:01 PM Subject: Re: Invalid content type error Hello All, I'm not sure you recall this request from last year, but i'm having the same issue, and I have checked to be sure, I'm encoding properly using PHP curl, have searched thru the list. Please help with a pointer, really lost now. TIA Mike Nwaogu. Alejandro Guerrieri alejandro.guerrieri at gmail.com Mon Mar 5 22:14:56 CET 2007 * Previous message: Invalid content type error * Next message: Problematic Kannel behaviour with large message stores * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] ________________________________ This looks more as a question for the "users" mailing list. From Kannel's standpoint this is a "kannel user" question, not a "kannel developer" one. Hint: Check if you are urlencoding your text fields. Regards, Alejandro. On 3/5/07, sudhir <ssharma at signdomains.com> wrote: > > > Hi, > i am using Kannel 1.4.1 for my sms application.The configuration > settings have been made.When i use that url directly into the browser it > runs fine, but i have to use it into my sms appplication which has been made > in ASP. > > To send the sms i have made a html form, and using javascript i am > submitting all the values to the kannel.after submitting it gives 'invalid > content type' error. > but when i print this URl on to the sreen and copy an paste it into the > browser ,then it runs fine. > > can anyone of you please tel me that where i am making the mistake or > anyother solution.I am using 'get' method in my form. > Thanks in advanvce. > > > Thanks & Regards, > Sudhir Sharma -- Alejandro Guerrieri Magicom http://www.magicom-bcn.net/ LinkedIn: http://www.linkedin.com/in/aguerrieri