[PATCH] WSP header parsing
Paul Bagyenda <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
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). Attached is a minimal patch to resolve this.
wsp.diff
(application/octet-stream, 657 B)
Index: wap/wsp_headers.c
===================================================================
RCS file: /home/cvs/gateway/wap/wsp_headers.c,v
retrieving revision 1.23
diff -u -r1.23 wsp_headers.c
--- wap/wsp_headers.c 24 Oct 2005 15:43:06 -0000 1.23
+++ wap/wsp_headers.c 1 Nov 2006 06:08:51 -0000
@@ -122,7 +122,7 @@
} else if (val > 127) {
*well_known_value = val - 128;
return WSP_FIELD_VALUE_ENCODED;
- } else if (val == WSP_QUOTE) { /* 127 */
+ } else if (val == WSP_QUOTE || val == '"') { /* 127 */
*well_known_value = -1;
/* We already consumed the Quote */
return WSP_FIELD_VALUE_NUL_STRING;