Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update regex in AccessLogger to accept underscore #1226

Merged
merged 2 commits into from
Sep 30, 2016

Conversation

esaezgil
Copy link
Contributor

@esaezgil esaezgil commented Sep 29, 2016

What do these changes do?

Update regex in AccessLogger to accept underscore, update Unit Tests

Are there changes in behavior for the user?

no

Related issue number

#1225

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add yourself to CONTRIBUTORS.txt
  • Add a new entry to CHANGES.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using #isuue_number format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.

update Unit Tests

@codecov-io
Copy link

codecov-io commented Sep 29, 2016

Current coverage is 98.28% (diff: 100%)

Merging #1226 into master will not change coverage

@@             master      #1226   diff @@
==========================================
  Files            29         29          
  Lines          6485       6485          
  Methods           0          0          
  Messages          0          0          
  Branches       1087       1087          
==========================================
  Hits           6374       6374          
  Misses           59         59          
  Partials         52         52          

Powered by Codecov. Last update 54808c7...4cd214b

@@ -269,7 +269,7 @@ class AccessLogger:
"""

LOG_FORMAT = '%a %l %u %t "%r" %s %b "%{Referrer}i" "%{User-Agent}i"'
FORMAT_RE = re.compile(r'%(\{([A-Za-z\-]+)\}([ioe])|[atPrsbOD]|Tf?)')
FORMAT_RE = re.compile(r'%(\{([A-Za-z\-_]+)\}([ioe])|[atPrsbOD]|Tf?)')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe numbers should be accepted as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure should we split header rules and environment variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to accept numbers, not sure about your last comment though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to me

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add your name to CONTRIBUTORS.txt

@@ -26,7 +26,7 @@ CHANGES
1.0.3 (XXXX-XX-XX)
------------------

-
- Modify regex in AccessLogger to accept underscore #1225
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in 1.1.0 section unless you make a PR against 1.0 branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out, updated

@esaezgil esaezgil force-pushed the issue_1225_update_regex branch from f6037bf to 8f55e61 Compare September 29, 2016 20:58
@esaezgil
Copy link
Contributor Author

I am already in CONTRIBUTORS.txt from a previous contribution :)

@esaezgil esaezgil force-pushed the issue_1225_update_regex branch from 8f55e61 to 4cd214b Compare September 29, 2016 21:04
Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!
Will merge after passing CI tests

@asvetlov asvetlov merged commit 5952d5d into aio-libs:master Sep 30, 2016
@asvetlov
Copy link
Member

Thanks!

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants