summaryrefslogtreecommitdiff
path: root/src/webob/acceptparse.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo.Ira Lun2019-06-211-1/+1
|
* Fix link to RFC.Ira Lun2019-06-211-2/+1
|
* Move comment to outside of list comprehension.Ira Lun2019-06-181-5/+2
| | | | | | | This is to avoid issues with a bug in Black (see https://github.com/Pylons/webob/pull/401#discussion_r294533700.) Also, make the comment slightly more helpful.
* Rearrange lines to make Black happy.Ira Lun2019-06-161-2/+4
|
* Remove unnecessary assignment.Ira Lun2019-06-161-3/+2
|
* Combine sorts.Ira Lun2019-06-161-4/+2
|
* support copying accept headersMichael Merickel2018-10-231-0/+92
|
* Cleanup backslash escapingBert JW Regeer2018-10-181-30/+30
|
* Remove blank line.Ira Lun2018-10-171-1/+0
|
* Remove unused asterisk_non0_found, and rearrange for readability.Ira Lun2018-10-171-12/+6
| | | | | | `*` ranges with non-0 qvalues are essentially ignored (see https://tools.ietf.org/html/rfc4647#section-3.4, the paragraph starting with 'The special language range "*"...').
* Fix many flake8 warnings/errorsBert JW Regeer2018-10-151-20/+133
|
* WebOb is now formatted by ambv/blackBert JW Regeer2018-10-141-531/+472
| | | | | | | All future commits will be required to format their code using Python black. This also hooks up linting and all that fun stuff to enforce it.
* stop parsing extension params in acceptable_offers and fix commentMichael Merickel2018-10-101-8/+4
|
* support passing around AcceptOffer objectsMichael Merickel2018-10-101-8/+40
|
* remove media range support for offersMichael Merickel2018-10-091-79/+9
| | | | | | | | see the multitude of reasons in https://github.com/Pylons/pyramid/pull/3326 the short answer is that they are fundamentally broken in that media ranges cannot properly match against any accept header with q=0 content
* fix commentMichael Merickel2018-10-021-1/+1
|
* further simplifyMichael Merickel2018-10-021-7/+6
|
* use Accept.parse_offer to be consistent across the codebaseMichael Merickel2018-10-021-20/+25
|
* more clearly define specificity constantsMichael Merickel2018-09-271-4/+9
|
* return a named tupleMichael Merickel2018-09-251-2/+27
|
* support a standard api for parsing media typesMichael Merickel2018-09-121-4/+47
|
* Merge pull request #370 from mmerickel/acceptable-offers-rangesBert JW Regeer2018-09-051-7/+32
|\ | | | | add support for media ranges as offers to acceptable_offers
| * add ranges support to acceptable_offersMichael Merickel2018-09-051-7/+32
| |
* | Clarify comment and remove irrelevant information.Ira Lun2018-09-061-3/+2
|/
* add comment explaining why we're filtering offers in invalid/missing headersMichael Merickel2018-09-051-0/+3
|
* clarify return typeMichael Merickel2018-09-051-2/+2
|
* clarify the filtering commentMichael Merickel2018-09-051-5/+7
|
* fix docstringMichael Merickel2018-09-041-1/+1
|
* do not raise on offers that do not match the media type ABNFMichael Merickel2018-09-031-13/+30
|
* MIMEAccept mimics old behaviour betterBert JW Regeer2018-04-101-9/+66
| | | | | | | | | | This updates MIMEAccept to mimic old behaviour better so that downstream projects are not as broken. The goal is not to provide the exact same behaviour, and thus MIMEAccept still uses the new Accept header parsing and matching, however it is much closer to the old API because it no longer raises on an invalid header vs what was shipped in WebOb 1.8.0.
* add trailing whitespaces to deprecation warning for MIMEAcceptSteve Piercy2018-01-301-2/+2
| | | | (cherry picked from commit 3fa3311)
* Add MIMEAccept shim that warns about deprecationBert JW Regeer2018-01-011-1/+21
|
* Add MIMEAccept for backward compatibility.Ira Lun2017-11-061-0/+3
|
* List possible types for all header subclasses.Ira Lun2017-08-291-6/+6
|
* Fix typo.Ira Lun2017-08-291-1/+1
|
* Improve AcceptLanguageValidHeader.basic_filtering.Ira Lun2017-08-291-76/+80
| | | | | | | | | | | | | | | The main change here is to simplify the handling of duplicate ranges in the header. The RFC does not specify what to do when the same range appears in the header more than once, possibly with different qvalues and giving conflicting information. Previously, we chose which of the possibly conflicting versions of the range to use for matching by first checking if there was one with q=0, which would take priority; if one with q=0 was not found, we chose the one with the highest qvalue. Having given it a lot more thought, it now seems clear that this kind of special handling is not necessary -- the simplest way to handle it is to take the first appearance of the range in the header (from the left) and simple use that for matching.
* Correct method calls in examples.Ira Lun2017-08-291-2/+2
|
* Only retrieve qvalue, as we do not need language_range.Ira Lun2017-08-291-4/+2
|
* Fix markup.Ira Lun2017-08-291-15/+15
|
* Update module docstring.Ira Lun2017-08-291-7/+3
|
* Remove obsolete regex.Ira Lun2017-08-291-3/+0
|
* Remove unused imports.Ira Lun2017-08-291-4/+0
|
* Remove the unused _check_offer.Ira Lun2017-08-291-3/+0
|
* Remove MIMEAccept, MIMENilAccept and NilAccept.Ira Lun2017-08-291-157/+0
|
* Rewrite accept_property and add tests.Ira Lun2017-08-291-22/+62
|
* Add create_accept_header, docs and tests.Ira Lun2017-08-291-0/+22
|
* Add AcceptInvalidHeader class, docs and tests.Ira Lun2017-08-291-0/+113
|
* Add AcceptNoHeader class, docs and tests.Ira Lun2017-08-291-0/+103
|
* Add _AcceptInvalidOrNoHeader class.Ira Lun2017-08-291-0/+202
|
* Add AcceptValidHeader class, docs and tests.Ira Lun2017-08-291-0/+647
|