[SIP] parsing bugs/limitations and patch
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @pitrou reported | |
|---|---|
| Trac ID | trac#2220 |
| Type | defect |
| Created | 2006-11-06 10:01:15Z |
This is a new ticket to solve a set of parsing-related bugs/limitations in the SIP protocol implementation.
The bugs are :
- #2194
- #2197
- #2198
- parseViaHeader() throws an exception when it encounters a parameter it doesn't know about; the proper way to handle this is to ignore unknown params rather than refusing to construct the Via object
The attached patch against the trunk fixes all 4 bugs, and it adds 4 test cases (one for each bug).
The function parseViaHeader() also becomes an alias for the class method Via.fromString(), which means we can now subclass the Via class, and use the parsing method as-is (by calling MyViaSubclass.fromString()).
I first tried the approach suggested by JP, which is to backport stuff from divmod Sine, but:
- it is too uncertain and too much work (no documentation, behaviour may be slightly different)
- the aforementioned bugs, apart from multiline header parsing, do exist in the Sine implementation as well
- we don't know whether and in which direction divmod Sine will evolve anyway, so there is no clear benefit in trying to follow it
Attachments:
- sip-fixes.diff (27074 bytes) - added by antoine on 2006-11-06 10:01:43Z - patch for sip parsing bugs
Searchable metadata
trac-id__2220 2220
type__defect defect
reporter__antoine antoine
priority__normal normal
milestone__
branch__
branch_author__
status__new new
resolution__None None
component__core core
keywords__
time__1162807275000000 1162807275000000
changetime__1162825790000000 1162825790000000
version__None None
owner__
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the attached sip-fixes.diff and the four referenced issues (#2194, #2197, #2198, plus the unknown-parameter case). Inspect parseViaHeader() and Via.fromString(), then review the four test cases added by the patch; done means the documented parsing defects are covered and unknown Via parameters are ignored without preventing Via construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 15/100