Ethereal-dev: RE: [Ethereal-dev] [PATCH][WSP]Decoding of Quoted-string

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Mon, 17 Nov 2003 18:36:57 +0100
Hi Loïc,

| From: Loïc Minier
| 
|       Good evening list,
| 
|  Attached patch suppress the leading quote from a Quoted-string in WSP
|  header-values.
| 
|  This is not a perfect fix, because we're supposed to parse a WSP
|  Quoted-string as a RFC2616 Quoted-string.
| 
|  I suggest the same kind of patch for WSP Text-string starting with a
|  WSP Quote (0x7f).
| 
|  Questions for Olivier, or any other packet-wsp.c interested person:
|    - what about changing:
|     "#define is_quoted_string(x)     is_text_string(x)"
|  ... in packet-wsp.c to:
|     "#define is_quoted_string(x)     ( (x == 34) )"

No problems with that, but some handsets do not always comply with this
rule, so maybe we want to fall-back to text-string afterwards? Additionally,
some handsets only display the starting quote, other handsets also encode
the closing quote. And others don't quote at all :)

|    - what is this for:
|     "val_len++; /* For extra '\0' byte */"
|  ... also in packet-wsp.c, about line 1740 after this patch

If the text string is { 'a', 'b', 'c', '\0' }, then val_len will only return
3 while the value is indeed encoded as 4 bytes (val_len is the actual length
of the value as found in the packet). So we need to add this zero byte to
the count.

|    - do you have a capture with x-wap-tod textually encoded 
| followed by binary-encoded date?

Yes! That's also why I flag this header value with a "<warning...>".

Best regards,

Olivier