Re: X-Kannel Header Problem

Benjamin Lee <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
See comments inserted below... 

On Sunday, 2003-10-05 at 10:34:21 AM, Rory Campbell-Lange scribbled:
> I am running Kannel cvs-20030915.
> 
> I have a perl script that sends messages and needs to send DLR and
> validity information.
> 
> I would like to set this with an X-Kannel header, but it doesn't work,
> although I have verified that my script sends the headers to apache.
> 
> Instead I have to put these items in the get url, which seems somewhat
> less elegant.
> 
> Is this a known bug?
> Thanks,
> Rory
> 
> --- perl code snippet ---
> my $dlr_url = uri_escape('http://localhost/cgi-bin/dlr.pl?row=$msgid&dlr=%d');
> $h->header('X-Kannel-DLR-Mask'      => 7);
> $h->push_header('X-Kannel-DLR-URL'  =>  $dlr_url);
> $h->push_header('X-Kannel-Validity' => 7200);
> 
> # I have been using this to make it work:
> # my $dlr_url = '&validity=7200&dlr-mask=7&dlr-url=' . uri_escape('http://localhost/cgi-bin/dlr.pl?row=' . $msgid . '&dlr=%d');
> # $url = $url . $dlr_url;
> 
> my $ua = LWP::UserAgent->new(env_proxy => 1, keep_alive => 1, timeout => 30,);
> my $request = HTTP::Request->new('GET', $url, $h);

Just checking... are you saying that...

my $request = HTTP::Request->new('POST', $url, $h);
                                ##^^^^##
doesn't work?


> my $output = $ua->request($request);
> --- perl code snippet ---
> 
> --- php test receipt ---
>     [Connection] => Keep-Alive
>     [Host] => localhost
>     [Keep-Alive] => 300
>     [User-Agent] => libwww-perl/5.69
>     [X-Kannel-DLR-Mask] => 7
>     [X-Kannel-DLR-URL] => http%3A%2F%2Flocalhost%2Fcgi-bin%2Fdlr.pl%3Frow%3D%24msgid%26dlr%3D%25d
>     [X-Kannel-Validity] => 7200
> --- php test receipt ---
> 
> 
> 
> 
> -- 
> Rory Campbell-Lange 
> <[email protected]>
> <www.campbell-lange.net>

-- 
Benjamin Lee
Melbourne, Australia         "Always real."    http://www.realthought.net/

__________________________________________________________________________
Bus error -- please leave by the rear door.
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.