{ "info": { "author": "Philip J Grabner, Cadit Health Inc", "author_email": "oss@cadit.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Environment :: Web Environment", "Framework :: Pyramid", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "License :: Public Domain", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "========================\nPyramid Method Rewriting\n========================\n\nThe ``pyramid_methodrewrite`` package is a pyramid plugin that adds a\n\"tween\" that rewrites the active HTTP method (as exposed via\n``request.method``) to the value provided in a HTTP header or\nquery-string. The main reason for this is to allow clients to fake the\nuse of HTTP methods beyond GET and POST (such as PUT and DELETE) that\nare behind non-compliant proxies, browsers, or other deficient\nsoftware that limit which HTTP methods can be sent.\n\nIt does this by looking for an ``X-HTTP-Method-Override`` HTTP header\nor a ``_method`` parameter in either the query-string or POST data,\nand if the value is of the known set of HTTP methods, will override\nthe active request's ``.method`` attribute. Both the header name and\nparameter name are configurable. The header value, if specified, takes\nprecedence over the parameter value.\n\nFor example, the request:\n\n.. code-block:: text\n\n GET /path/to/resource?_method=OPTIONS HTTP/1.1\n\nBecomes equivalent (from the application's point of view) to:\n\n.. code-block:: text\n\n OPTIONS /path/to/resource HTTP/1.1\n\n\nProject\n=======\n\n* Homepage: https://github.com/cadithealth/pyramid_methodrewrite\n* Bugs: https://github.com/cadithealth/pyramid_methodrewrite/issues\n\n\nInstallation\n============\n\n\n.. code-block:: bash\n\n $ pip install pyramid-methodrewrite\n\n\nUsage\n=====\n\nEnable the tween either in your INI file via:\n\n.. code-block:: ini\n\n pyramid.includes = pyramid_methodrewrite\n\nor in code in your package's application initialization via:\n\n.. code-block:: python\n\n def main(global_config, **settings):\n # ...\n config.include('pyramid_methodrewrite')\n # ...\n\n\nConfiguration\n=============\n\nThe following configuration settings can be set in your application's\n``main`` section:\n\n* `methodrewrite.enabled`: a boolean flag to control whether or not\n method rewriting should be enabled. Default: ``True``.\n\n* `methodrewrite.on`: a list of incoming HTTP methods that will cause\n this tween to check the request parameters and potentially make the\n change. Defaults to ``(GET, POST)``.\n\n* `methodrewrite.header`: the name of the header that controls the\n requested method. Defaults to ``X-HTTP-Method-Override``. If\n present, the header override takes precedence over the parameter\n override.\n\n* `methodrewrite.param`: the name of the parameter that controls the\n requested method. Defaults to ``_method``.\n\n* `methodrewrite.to`: list of acceptable HTTP methods that a request\n can be rewritten to. If set to empty, no restrictions will be made\n on mapping to acceptable or known methods. Defaults to\n ``pyramid_methodrewrite.HTTP_METHODS``.\n\nNote that all method names are always converted to upper case.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/cadithealth/pyramid_methodrewrite", "keywords": "web wsgi pyramid http method rewrite proxy work-around", "license": "MIT (http://opensource.org/licenses/MIT)", "maintainer": null, "maintainer_email": null, "name": "pyramid_methodrewrite", "package_url": "https://pypi.org/project/pyramid_methodrewrite/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyramid_methodrewrite/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/cadithealth/pyramid_methodrewrite" }, "release_url": "https://pypi.org/project/pyramid_methodrewrite/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "A pyramid plugin that rewrites the HTTP method based on a query-string parameter.", "version": "0.2.3" }, "last_serial": 1757055, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "d342911c1041e35489f441f333b93e73", "sha256": "07cc0011a02b038d9b87649bed699ad57a377ad6be952d98394e9ab0b5e45bd3" }, "downloads": -1, "filename": "pyramid_methodrewrite-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d342911c1041e35489f441f333b93e73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4452, "upload_time": "2013-04-08T15:36:06", "url": "https://files.pythonhosted.org/packages/8e/b8/04691f2b4175a36604b32a7933bd988aab6b387772fe4448ade75c7f5b1d/pyramid_methodrewrite-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "da59a8e5a629628fadba4301727e9ec8", "sha256": "933410291b07eb0e0ef8e08cc7c1a9fa251d93ee67712485a4bf836fbd91329c" }, "downloads": -1, "filename": "pyramid_methodrewrite-0.2.1.tar.gz", "has_sig": false, "md5_digest": "da59a8e5a629628fadba4301727e9ec8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5266, "upload_time": "2013-11-06T19:08:32", "url": "https://files.pythonhosted.org/packages/32/40/d4d5458a82fafc182fe23bdb0e6b2ea657590bcac36abf2f70082a0f4e55/pyramid_methodrewrite-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e399e53d9e2f42c9bc4403a2091dc19f", "sha256": "fde51c2baf074bbcf0becf43a3e41c39d10e8236f85f02b52d40d591e11ad84b" }, "downloads": -1, "filename": "pyramid_methodrewrite-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e399e53d9e2f42c9bc4403a2091dc19f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5834, "upload_time": "2015-03-17T17:19:51", "url": "https://files.pythonhosted.org/packages/5e/d7/92a56aa935c9adf93a64400cfc50538ccc0ad765bf1f2000f3d9aaa2b71f/pyramid_methodrewrite-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "d80cc0530cc070bc67e1c0f474f245b5", "sha256": "37da8b0c7d8b2e3dbfe8db4b689a2ccd7ae7e7c70d160317a3d3b46c40292c96" }, "downloads": -1, "filename": "pyramid_methodrewrite-0.2.3.tar.gz", "has_sig": false, "md5_digest": "d80cc0530cc070bc67e1c0f474f245b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5821, "upload_time": "2015-10-07T19:04:46", "url": "https://files.pythonhosted.org/packages/ee/40/77ce4dd1899bc4d0141dc73b0ed1242df2a846cc6357d5cdf843bb6873c1/pyramid_methodrewrite-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d80cc0530cc070bc67e1c0f474f245b5", "sha256": "37da8b0c7d8b2e3dbfe8db4b689a2ccd7ae7e7c70d160317a3d3b46c40292c96" }, "downloads": -1, "filename": "pyramid_methodrewrite-0.2.3.tar.gz", "has_sig": false, "md5_digest": "d80cc0530cc070bc67e1c0f474f245b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5821, "upload_time": "2015-10-07T19:04:46", "url": "https://files.pythonhosted.org/packages/ee/40/77ce4dd1899bc4d0141dc73b0ed1242df2a846cc6357d5cdf843bb6873c1/pyramid_methodrewrite-0.2.3.tar.gz" } ] }