Commit 67f94c9
marcel
Fix #129: Strip quotes from SIP parameter values in parser
The generic SIP parameter parser (_parse_gen_params) was including the
surrounding double-quotes as part of quoted parameter values. For
example, boundary="myboundary" was stored as "myboundary" (with quotes)
instead of myboundary (without quotes).
This caused multipart MIME body parsing to fail because
findNextBoundary() searched for "--\"myboundary\"" in the body instead
of "--myboundary", resulting in "unexpected end-of-buffer" errors.
The fix adjusts the VP_PVALUE_QUOTED state handling to skip past the
opening quote when recording the value start position, and to stop
before the closing quote when recording the value end position.
This has no impact on other SIP parameters (tag, branch, received,
rport, lr, transport) as they are always tokens and never quoted.1 parent c1f4d4c commit 67f94c9
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
0 commit comments