Skip to content

Commit

Permalink
Fix negative substring bug
Browse files Browse the repository at this point in the history
Changes to/from -> sent-to/sent-from so as not to conflict with the
match object's to/from methods.

Resolves #6
  • Loading branch information
ugexe committed Aug 22, 2017
1 parent df065bd commit 210371b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion META6.json
@@ -1,7 +1,7 @@
{
"perl" : "6",
"name" : "Grammar::HTTP",
"version" : "0.0.1",
"version" : "0.0.2",
"auth" : "github:ugexe",
"authors" : [
"Nick Logan",
Expand Down
16 changes: 8 additions & 8 deletions lib/Grammar/HTTP/RFC5322.pm6
Expand Up @@ -119,10 +119,10 @@ role Grammar::HTTP::RFC5322 {
]*
[
|| <orig-date>
|| <from>
|| <sent-from>
|| <sender>
|| <reply-to>
|| <to>
|| <sent-to>
|| <cc>
|| <bcc>
|| <message-id>
Expand All @@ -137,13 +137,13 @@ role Grammar::HTTP::RFC5322 {
token orig-date { "Date:" <date-time> <.CRLF> }
token from { "From:" <mailbox-list> <.CRLF> }
token sent-from { "From:" <mailbox-list> <.CRLF> }
token sender { "Sender:" <mailbox> <.CRLF> }
token reply-to { "Reply-To:" <address-list> <.CRLF> }
token to { "To:" <address-list> <.CRLF> }
token sent-to { "To:" <address-list> <.CRLF> }
token cc { "Cc:" <address-list> <.CRLF> }
Expand Down Expand Up @@ -269,10 +269,10 @@ role Grammar::HTTP::RFC5322 {
|| <obs-return>
|| <obs-received>
|| <obs-orig-date>
|| <obs-from>
|| <obs-sent-from>
|| <obs-sender>
|| <obs-reply-to>
|| <obs-to>
|| <obs-sent-to>
|| <obs-cc>
|| <obs-bcc>
|| <obs-message-id>
Expand All @@ -295,13 +295,13 @@ role Grammar::HTTP::RFC5322 {
token obs-orig-date { "Date" <.WSP>* ':' <.date-time> <.CRLF> }
token obs-from { "From" <.WSP>* ':' <.mailbox-list> <.CRLF> }
token obs-sent-from { "From" <.WSP>* ':' <.mailbox-list> <.CRLF> }
token obs-sender { "Sender" <.WSP>* ':' <.mailbox> <.CRLF> }
token obs-reply-to { "Reply-To" <.WSP>* ':' <.address-list> <.CRLF> }
token obs-to { "To" <.WSP>* ':' <.address-list> <.CRLF> }
token obs-sent-to { "To" <.WSP>* ':' <.address-list> <.CRLF> }
token obs-cc { "Cc" <.WSP>* ':' <.address-list> <.CRLF> }
Expand Down
6 changes: 3 additions & 3 deletions lib/Grammar/HTTP/RFC6854.pm6
@@ -1,9 +1,9 @@
# Update to Internet Message Format to Allow Group Syntax in the "From:" and "Sender:" Header Fields

role Grammar::HTTP::RFC6854 {
my token from { "From:" [<mailbox-list> || <address-list>] <.CRLF> }
my token sender { "Sender:" [<mailbox> || <address>] <.CRLF> }
my token reply-to { "Reply-To:" <address-list> <.CRLF> }
my token sent-from { "From:" [<mailbox-list> || <address-list>] <.CRLF> }
my token sender { "Sender:" [<mailbox> || <address>] <.CRLF> }
my token reply-to { "Reply-To:" <address-list> <.CRLF> }

my token resent-from { "Resent-From:" [<mailbox-list> || <address-list>] <.CRLF> }
my token resent-sender { "Resent-Sender:" [<mailbox> || <address>] <.CRLF> }
Expand Down

0 comments on commit 210371b

Please sign in to comment.