Re: [PATCH] WSP header parsing
Paul Bagyenda <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Stipe, While I can't comment on how different stacks behave, I can say for sure that: - At least the Nokia series 60 seems to use the quote as I had suggested, which - If you look at the WAP-203-WSP spec, section 8.4.2.1 (Basic Rules), we see that: --- Text-string = [Quote] *TEXT End-of-string ; If the first character in the TEXT is in the range of 128-255, a Quote character must precede it. ; Otherwise the Quote character must be omitted. The Quote is not part of the contents. .... Quoted-string = <Octet 34> *TEXT End-of-string ;The TEXT encodes an RFC2616 Quoted-string with the enclosing quotation-marks <"> removed .... Quote = <Octet 127> End-of-string = <Octet 0> .... which means that for quoted/text strings we need to catch both the <"> and the octet 127 On Nov 19, 2006, at 01:50, Stipe Tolj wrote: > Paul Bagyenda wrote: > >> Hi, >> There is a minor problem with the parsing of quoted strings in >> wap/ wsp_headers.c -- some stacks (nokia/symbian 9 at least) use a >> literal quote, which then gets missed by the parser. The net >> effect is that the string returned still retains the quote >> (without the corresponding end quote). > > ok, this was actually already "fixed" in rev 1.17, but I changed it > again in 1.18, see my ChangeLog entry: > > 2004-07-09 Stipe Tolj <[email protected]> > * gw/smsc/smsc_soap.c: changing #ifdef #warning's to commented > blocks to > get rid of the compiler warnings in the nightly build tests. > This module > still _needs_ revision for the new UUIDs that are used. > * wap/wsp_headers.c: Bruno moved packing/unpacking of > PROXY_AUTHxxx away > by commenting them out. This was in revision 1.10. And there > is no reason > for this in the ChangeLog entry??? BTW, this makes the > checks/check_headers.sh test fail for the relevant Proxy- > Authxxx headers. > That is why I put things in again, as long as noone complains > and tells > us why they have been commented in rev 1.10. Along with this > Aarno did > break the quoted parameter parsing within revision 1.17. > Reverting this > back to the previous behaviour to make test/test_headers.c > happy again. > * test/test_header.c: fixing trivial compiler warning > * test/header_test: chaning the expected values to have quoted > parameter > values to make the test program happy again. > > ok, so this way my "fault". Obviously we're rather into fixing the > test/test_headers.c instead of the WSP parsing? > > Paul, can you confirm that this patch works for all know stacks > behaviour? > > Commited to cvs, since this seems reasonable to me. > > 2006-11-18 Stipe Tolj <stolj at kannel.org> > * wap/wsp_headers.c: re-adding quote char (") recognizing > within the > wsp_field_value() that isolates header values. Thanks again > to Paul. > [Msg-Id: <[email protected]>] > > A big clapp-of-hands to Paul! > > Stipe > > ------------------------------------------------------------------- > Kölner Landstrasse 419 > 40589 Düsseldorf, NRW, Germany > > tolj.org system architecture Kannel Software Foundation (KSF) > http://www.tolj.org/ http://www.kannel.org/ > > mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org > -------------------------------------------------------------------