Re: added OMA-EMN support to Kannel PPG
Aarno Syvänen <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Hi, Yes, though i think this one should added both ppg core (then the headers will be removed always; this is for efficiency) and for ppg user group (the user to not accept certain headers) Aarno On 15 Aug 2007, at 18:10, Paul Flanagan wrote: > Thanks Aarno > Is that functionality likely to be added soon? > > I don't mind adding it but I'm not sure where it should be added > (I'm fairly new to using kannel) > > Something like a ppg group setting? > > group = ppg > remove-headers = Content-length,Encoding-Version,Authorization > > > > On 15/08/07, Aarno Syvänen <[email protected]> wrote: > Hi Paul. > > as a quick reply, adding a configuring option to PPG for omitting > certain headers would be > a good idea, if only for efficiency (the transport is over SMS!) > Generally, a gateway would pass > all (expect hop ones) headers, but in this case default behavior is > inefficient. > > Aarno > > On 15 Aug 2007, at 17:07, Paul Flanagan wrote: > >> Hi there >> I needed a way to test a PAP interface I wrote to send OMA Email >> Notifications as defined in http://www.openmobilealliance.org/ >> release_program/emn_v10.html >> >> so I added OMA-EMN support to kannel. >> >> OMA Email Notification (EMN) enables the mobile e-mail client to >> be notified of a new e-mail via wappush. >> Attached is diff of gateway/gw/wap_push_ppg.c and 2 new files. >> Code is closely based on wap_push_sl_compiler.c >> >> It works fine but after much testing with SonyEricsson K800i I >> discovered that I had to remove all headers from the wap push >> except for >> X-Wap-Application-Id: x-wap-application: emn.ua >> (X-Wap-Application-Id: x-wap-application:emn.ua header is >> definitely required by all Nokia phones that support OMA EMN) >> >> It seems that there is no way to configure kannel to leave out >> certain headers. Most HTTP headers from the PAP request are >> converted to WSP headers e.g. HTTP authorization headers. >> In addition to HTTP headers, it seems that the following 2 headers >> are always encoded >> >> Content-length >> Encoding-Version >> >> Again, OMA-EMN did not work on SE phones if those headers were >> present. >> I realise that this is probably a bug in the phone that it cannot >> handle those headers but it would be great if there was a way to >> configure kannel to leave out those headers. >> To work-around that problem I unconditionally remove these >> headers by adding the following lines to wap_push_ppg.c before the >> call to pap_compile() >> http_header_remove_all(push_headers, "Content-Length"); >> http_header_remove_all(push_headers, "Encoding-Version"); >> That works but it's not a nice solution. >> I believe above headers (Content-Length, Encoding-Version) are >> optional. It's pointless to send HTTP authorization headers to the >> phone. >> Adding a configuration setting to tell kannel not to add certain >> headers into the WAPPUSH is probably the best solution. >> I want to get your opinion on this. Am I missing something here? I >> didn't see anywhere in the WSP spec where it says those headers >> are required. >> >> I can send on a diff of the code I've written but I thought I'd >> wait until I handle the header problem in a better way >> >> This issue similar to issue raised in following thread >> http://www.mail-archive.com/[email protected]/msg06941.html >> except in this case, it just doesn't just increase the number of >> SMS messages required to carry the wappush, it breaks the OMA EMN >> functionaly. >> >> >> Regards >> Paul Flanagan >> >> >> >> >> >> >> >> >> >> >> > >