Skip to content

Commit

Permalink
Allow semicolons on end of media type
Browse files Browse the repository at this point in the history
Also remove bad import from tcp/direction.py
  • Loading branch information
Andrew Fleenor committed Jul 12, 2012
1 parent 91070a7 commit 6fc5c31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mediatype.py
Expand Up @@ -15,7 +15,7 @@ class MediaType(object):
# of string as the types above, values are pretty much anything but another # of string as the types above, values are pretty much anything but another
# semicolon # semicolon
mediatype_re = re.compile( mediatype_re = re.compile(
r'^([\w\-+.]+)/([\w\-+.]+)((?:\s*;\s*[\w\-]+=[^;]+)*)\s*$' r'^([\w\-+.]+)/([\w\-+.]+)((?:\s*;\s*[\w\-]+=[^;]+)*);?\s*$'
) )
# RE for parsing name-value pairs # RE for parsing name-value pairs
nvpair_re = re.compile(r'^\s*([\w\-]+)=([^;\s]+)\s*$') nvpair_re = re.compile(r'^\s*([\w\-]+)=([^;\s]+)\s*$')
Expand Down
2 changes: 1 addition & 1 deletion tcp/direction.py
Expand Up @@ -2,7 +2,7 @@
import chunk as tcp import chunk as tcp
from operator import itemgetter, attrgetter from operator import itemgetter, attrgetter
import logging as log import logging as log
from pcap2har import settings import settings
import packet import packet
import logging import logging


Expand Down

0 comments on commit 6fc5c31

Please sign in to comment.