summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsip/sip_config.h17
-rw-r--r--pjsip/include/pjsip/sip_parser.h4
2 files changed, 21 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h
index 535f6697..2d635d62 100644
--- a/pjsip/include/pjsip/sip_config.h
+++ b/pjsip/include/pjsip/sip_config.h
@@ -130,6 +130,23 @@
#endif
+/**
+ * If non-zero, SIP parser will unescape the escape characters ('%')
+ * in the original message, which means that it will modify the
+ * original message. Otherwise the parser will create a copy of
+ * the string and store the unescaped string to the new location.
+ *
+ * Unescaping in-place is faster, but less elegant (and it may
+ * break certain applications). So normally it's disabled, unless
+ * when benchmarking (to show off big performance).
+ *
+ * Default: 0
+ */
+#ifndef PJSIP_UNESCAPE_IN_PLACE
+# define PJSIP_UNESCAPE_IN_PLACE 0
+#endif
+
+
/* Endpoint. */
#define PJSIP_MAX_TIMER_COUNT (2*PJSIP_MAX_TSX_COUNT + 2*PJSIP_MAX_DIALOG_COUNT)
diff --git a/pjsip/include/pjsip/sip_parser.h b/pjsip/include/pjsip/sip_parser.h
index b9e752f0..54dd52df 100644
--- a/pjsip/include/pjsip/sip_parser.h
+++ b/pjsip/include/pjsip/sip_parser.h
@@ -315,10 +315,14 @@ extern pj_cis_t
pjsip_HEX_SPEC, /**< Hexadecimal digits. */
pjsip_PARAM_CHAR_SPEC, /**< For scanning pname (or pvalue when it's
not quoted.) */
+ pjsip_PARAM_CHAR_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_HDR_CHAR_SPEC, /**< Chars in hname/havalue in URL. */
+ pjsip_HDR_CHAR_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_PROBE_USER_HOST_SPEC, /**< Hostname characters. */
pjsip_PASSWD_SPEC, /**< Password. */
+ pjsip_PASSWD_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_USER_SPEC, /**< User */
+ pjsip_USER_SPEC_ESC, /**< Variant without the escape ('%') char */
pjsip_NOT_NEWLINE, /**< For eating up header, basicly any chars
except newlines or zero. */
pjsip_NOT_COMMA_OR_NEWLINE, /**< Array elements. */