Skip to content

Commit 62ca0c3

Browse files
committed
HTTP -> HTTPS everywhere
closes: #1500
1 parent da7e372 commit 62ca0c3

17 files changed

Lines changed: 86 additions & 86 deletions

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Thanks to all the people who found bugs, sent patches, spread the word, helped e
4646
* masklinn
4747
* Michael Labbe
4848
* Michael Soulier
49-
* `reddit <http://reddit.com/r/python>`_
49+
* `reddit <https://reddit.com/r/python>`_
5050
* Nicolas Vanhoren
5151
* Oz N Tiram
5252
* Robert Rollins

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
.. image:: http://bottlepy.org/docs/dev/_static/logo_nav.png
2-
:target: http://bottlepy.org/
1+
.. image:: https://bottlepy.org/docs/dev/_static/logo_nav.png
2+
:target: https://bottlepy.org/
33
:alt: Bottle Logo
44
:align: right
55

@@ -29,15 +29,15 @@
2929
Bottle: Python Web Framework
3030
============================
3131

32-
Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <http://docs.python.org/library/>`_.
32+
Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <https://docs.python.org/library/>`_.
3333

3434
* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.
35-
* **Templates:** Fast `built-in template engine <http://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates.
35+
* **Templates:** Fast `built-in template engine <https://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates.
3636
* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP features.
3737
* **Server:** Built-in development server and ready-to-use adapters for a wide range of WSGI_ capable HTTP server (e.g. gunicorn_, paste_ or cheroot_).
3838

3939

40-
Homepage and documentation: http://bottlepy.org
40+
Homepage and documentation: https://bottlepy.org
4141

4242

4343
Example: "Hello World" in a bottle

bottle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
template engines - all in a single file and with no dependencies other than the
88
Python Standard Library.
99
10-
Homepage and documentation: http://bottlepy.org/
10+
Homepage and documentation: https://bottlepy.org/
1111
1212
Copyright (c) 2009-2025, Marcel Hellkamp.
1313
License: MIT (see LICENSE for details)
@@ -3618,7 +3618,7 @@ def run(self, handler):
36183618

36193619

36203620
class GunicornServer(ServerAdapter):
3621-
""" Untested. See http://gunicorn.org/configure.html for options. """
3621+
""" Untested. See https://gunicorn.org/configure.html for options. """
36223622

36233623
def run(self, handler):
36243624
from gunicorn.app.base import BaseApplication

docs/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ You can write your own adapter for your favourite template engine or use one of
187187
Class URL Decorator Render function
188188
======================== ================================== ==================== ========================
189189
:class:`SimpleTemplate` :doc:`stpl` :func:`view` :func:`template`
190-
:class:`MakoTemplate` http://www.makotemplates.org :func:`mako_view` :func:`mako_template`
191-
:class:`CheetahTemplate` http://www.cheetahtemplate.org/ :func:`cheetah_view` :func:`cheetah_template`
190+
:class:`MakoTemplate` https://www.makotemplates.org :func:`mako_view` :func:`mako_template`
191+
:class:`CheetahTemplate` https://www.cheetahtemplate.org/ :func:`cheetah_view` :func:`cheetah_template`
192192
:class:`Jinja2Template` https://jinja.palletsprojects.com/ :func:`jinja2_view` :func:`jinja2_template`
193193
======================== ================================== ==================== ========================
194194

docs/async.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Asynchronous Applications
22
=========================
33

4-
Asynchronous design patterns don't mix well with the synchronous nature of `WSGI <http://www.python.org/dev/peps/pep-3333/>`_. This is why most asynchronous frameworks (tornado, twisted, ...) implement a specialized API to expose their asynchronous features. Bottle is a WSGI framework and shares the synchronous nature of WSGI, but thanks to the awesome `gevent project <http://www.gevent.org/>`_, it is still possible to write asynchronous applications with bottle. This article documents the usage of Bottle with Asynchronous WSGI.
4+
Asynchronous design patterns don't mix well with the synchronous nature of `WSGI <https://www.python.org/dev/peps/pep-3333/>`_. This is why most asynchronous frameworks (tornado, twisted, ...) implement a specialized API to expose their asynchronous features. Bottle is a WSGI framework and shares the synchronous nature of WSGI, but thanks to the awesome `gevent project <https://www.gevent.org/>`_, it is still possible to write asynchronous applications with bottle. This article documents the usage of Bottle with Asynchronous WSGI.
55

66
The Limits of Synchronous WSGI
77
-------------------------------
88

9-
Briefly worded, the `WSGI specification (pep 3333) <http://www.python.org/dev/peps/pep-3333/>`_ defines a request/response circle as follows: The application callable is invoked once for each request and must return a body iterator. The server then iterates over the body and writes each chunk to the socket. As soon as the body iterator is exhausted, the client connection is closed.
9+
Briefly worded, the `WSGI specification (pep 3333) <https://www.python.org/dev/peps/pep-3333/>`_ defines a request/response circle as follows: The application callable is invoked once for each request and must return a body iterator. The server then iterates over the body and writes each chunk to the socket. As soon as the body iterator is exhausted, the client connection is closed.
1010

1111
Simple enough, but there is a snag: All this happens synchronously. If your application needs to wait for data (IO, sockets, databases, ...), it must either yield empty strings (busy wait) or block the current thread. Both solutions occupy the handling thread and prevent it from answering new requests. There is consequently only one ongoing request per thread.
1212

@@ -17,7 +17,7 @@ Greenlets to the rescue
1717

1818
Most servers limit the size of their worker pools to a relatively low number of concurrent threads, due to the high overhead involved in switching between and creating new threads. While threads are cheap compared to processes (forks), they are still expensive to create for each new connection.
1919

20-
The `gevent <http://www.gevent.org/>`_ module adds *greenlets* to the mix. Greenlets behave similar to traditional threads, but are very cheap to create. A gevent-based server can spawn thousands of greenlets (one for each connection) with almost no overhead. Blocking individual greenlets has no impact on the servers ability to accept new requests. The number of concurrent connections is virtually unlimited.
20+
The `gevent <https://www.gevent.org/>`_ module adds *greenlets* to the mix. Greenlets behave similar to traditional threads, but are very cheap to create. A gevent-based server can spawn thousands of greenlets (one for each connection) with almost no overhead. Blocking individual greenlets has no impact on the servers ability to accept new requests. The number of concurrent connections is virtually unlimited.
2121

2222
This makes creating asynchronous applications incredibly easy, because they look and feel like synchronous applications. A gevent-based server is actually not asynchronous, but massively multi-threaded. Here is an example::
2323

@@ -51,7 +51,7 @@ If you run this script and point your browser to ``http://localhost:8080/stream`
5151
Event Callbacks
5252
---------------
5353

54-
A very common design pattern in asynchronous frameworks (including tornado, twisted, node.js and friends) is to use non-blocking APIs and bind callbacks to asynchronous events. The socket object is kept open until it is closed explicitly to allow callbacks to write to the socket at a later point. Here is an example based on the `tornado library <http://www.tornadoweb.org/documentation#non-blocking-asynchronous-requests>`_::
54+
A very common design pattern in asynchronous frameworks (including tornado, twisted, node.js and friends) is to use non-blocking APIs and bind callbacks to asynchronous events. The socket object is kept open until it is closed explicitly to allow callbacks to write to the socket at a later point. Here is an example based on the `tornado library <https://www.tornadoweb.org/documentation#non-blocking-asynchronous-requests>`_::
5555

5656
class MainHandler(tornado.web.RequestHandler):
5757
@tornado.web.asynchronous
@@ -64,7 +64,7 @@ The main benefit is that the request handler terminates early. The handling thre
6464

6565
With Gevent+WSGI, things are different: First, terminating early has no benefit because we have an unlimited pool of (pseudo)threads to accept new connections. Second, we cannot terminate early because that would close the socket (as required by WSGI). Third, we must return an iterable to conform to WSGI.
6666

67-
In order to conform to the WSGI standard, all we have to do is to return a body iterable that we can write to asynchronously. With the help of `gevent.queue <http://www.gevent.org/gevent.queue.html>`_, we can *simulate* a detached socket and rewrite the previous example as follows::
67+
In order to conform to the WSGI standard, all we have to do is to return a body iterable that we can write to asynchronously. With the help of `gevent.queue <https://www.gevent.org/gevent.queue.html>`_, we can *simulate* a detached socket and rewrite the previous example as follows::
6868

6969
@route('/fetch')
7070
def fetch():
@@ -83,7 +83,7 @@ Finally: WebSockets
8383

8484
Lets forget about the low-level details for a while and speak about WebSockets. Since you are reading this article, you probably know what WebSockets are: A bidirectional communication channel between a browser (client) and a web application (server).
8585

86-
Thankfully the `gevent-websocket <http://pypi.python.org/pypi/gevent-websocket/>`_ package does all the hard work for us. Here is a simple WebSocket endpoint that receives messages and just sends them back to the client::
86+
Thankfully the `gevent-websocket <https://pypi.python.org/pypi/gevent-websocket/>`_ package does all the hard work for us. Here is a simple WebSocket endpoint that receives messages and just sends them back to the client::
8787

8888
from bottle import request, Bottle, abort
8989
app = Bottle()

docs/changelog.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ These changes might require special care when updating.
123123

124124
* :class:`Bottle` instances are now context managers. If used in a with-statement, the default application changes to the specific instance and the shortcuts for many instance methods can be used.
125125
* Added support for ``PATCH`` requests and the :meth:`Bottle.patch` decorator.
126-
* Added `aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop <https://github.com/MagicStack/uvloop>`_ server adapters.
126+
* Added `aiohttp <https://aiohttp.readthedocs.io/en/stable/>`_ and `uvloop <https://github.com/MagicStack/uvloop>`_ server adapters.
127127
* Added command-line arguments for config from json or ini files.
128128
* :meth:`Bottle.mount` now recognizes instances of :class:`Bottle` and mounts them with significantly less overhead than other WSGI applications.
129129
* The :attr:`Request.json <BaseRequest.json>` property now accepts ``application/json-rpc`` requests.
@@ -145,7 +145,7 @@ Release 0.12
145145
* Removed the ``Request.MAX_PARAMS`` limit. The hash collision bug in CPythons dict() implementation was fixed over a year ago. If you are still using Python 2.5 in production, consider upgrading or at least make sure that you get security fixed from your distributor.
146146
* New :class:`ConfigDict` API (see :doc:`configuration`)
147147

148-
More information can be found in this `development blog post <http://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.
148+
More information can be found in this `development blog post <https://blog.bottlepy.org/2013/07/19/preview-bottle-012.html>`_.
149149

150150

151151
Release 0.11
@@ -154,7 +154,7 @@ Release 0.11
154154
* Native support for Python 2.x and 3.x syntax. No need to run 2to3 anymore.
155155
* Support for partial downloads (``Range`` header) in :func:`static_file`.
156156
* The new :class:`ResourceManager` interface helps locating files bundled with an application.
157-
* Added a server adapter for `waitress <http://docs.pylonsproject.org/projects/waitress/en/latest/>`_.
157+
* Added a server adapter for `waitress <https://docs.pylonsproject.org/projects/waitress/en/latest/>`_.
158158
* New :meth:`Bottle.merge` method to install all routes from one application into another.
159159
* New :attr:`Request.app <BaseRequest.app>` property to get the application object that handles a request.
160160
* Added :meth:`FormsDict.decode()` to get an all-unicode version (needed by WTForms).
@@ -212,7 +212,7 @@ Release 0.9
212212

213213
* A brand new plugin-API. See :doc:`plugins/index` and :doc:`plugins/dev` for details.
214214
* The :func:`route` decorator got a lot of new features. See :meth:`Bottle.route` for details.
215-
* New server adapters for `gevent <http://www.gevent.org/>`_, `meinheld <http://meinheld.org/>`_ and `bjoern <https://github.com/jonashaag/bjoern>`_.
215+
* New server adapters for `gevent <https://www.gevent.org/>`_, `meinheld <https://meinheld.org/>`_ and `bjoern <https://github.com/jonashaag/bjoern>`_.
216216
* Support for SimpleTAL templates.
217217
* Better runtime exception handling for mako templates in debug mode.
218218
* Lots of documentation, fixes and small improvements.

docs/deployment.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
.. currentmodule:: bottle
33

44
.. _flup: https://pypi.org/project/flup/
5-
.. _gae: http://code.google.com/appengine/docs/python/overview.html
6-
.. _wsgiref: http://docs.python.org/library/wsgiref.html
5+
.. _gae: https://code.google.com/appengine/docs/python/overview.html
6+
.. _wsgiref: https://docs.python.org/library/wsgiref.html
77
.. _cherrypy: https://cherrypy.dev/
88
.. _paste: https://pythonpaste.readthedocs.io/
9-
.. _gunicorn: http://pypi.python.org/pypi/gunicorn
10-
.. _tornado: http://www.tornadoweb.org/
11-
.. _twisted: http://twistedmatrix.com/
12-
.. _diesel: http://dieselweb.org/
13-
.. _meinheld: http://pypi.python.org/pypi/meinheld
14-
.. _bjoern: http://pypi.python.org/pypi/bjoern
15-
.. _gevent: http://www.gevent.org/
16-
.. _eventlet: http://eventlet.net/
17-
.. _waitress: http://readthedocs.org/docs/waitress/en/latest/
18-
.. _apache: http://httpd.apache.org/
19-
.. _mod_wsgi: http://code.google.com/p/modwsgi/
20-
.. _pound: http://www.apsis.ch/pound
21-
.. _nginx: http://nginx.org/
22-
.. _lighttpd: http://www.lighttpd.net/
23-
.. _cherokee: http://cherokee-project.com/
9+
.. _gunicorn: https://pypi.python.org/pypi/gunicorn
10+
.. _tornado: https://www.tornadoweb.org/
11+
.. _twisted: https://twistedmatrix.com/
12+
.. _diesel: https://dieselweb.org/
13+
.. _meinheld: https://pypi.python.org/pypi/meinheld
14+
.. _bjoern: https://pypi.python.org/pypi/bjoern
15+
.. _gevent: https://www.gevent.org/
16+
.. _eventlet: https://eventlet.net/
17+
.. _waitress: https://readthedocs.org/docs/waitress/en/latest/
18+
.. _apache: https://httpd.apache.org/
19+
.. _mod_wsgi: https://code.google.com/p/modwsgi/
20+
.. _pound: https://www.apsis.ch/pound
21+
.. _nginx: https://nginx.org/
22+
.. _lighttpd: https://www.lighttpd.net/
23+
.. _cherokee: https://cherokee-project.com/
2424
.. _uWSGI: https://uwsgi-docs.readthedocs.io/en/latest/
2525
.. _cheroot: https://cheroot.cherrypy.dev/
2626

@@ -41,7 +41,7 @@ To get your application available to the outside world, specify the IP the serve
4141
Scaling for Production
4242
================================================================================
4343

44-
The built-in development server is base on `wsgiref WSGIServer <http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_, which is a very simple non-threading HTTP server implementation. This is perfectly fine for development, but may become a performance bottleneck when server load increases.
44+
The built-in development server is base on `wsgiref WSGIServer <https://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server>`_, which is a very simple non-threading HTTP server implementation. This is perfectly fine for development, but may become a performance bottleneck when server load increases.
4545

4646
The easiest way to increase performance is to install a multi-threaded server library like cheroot_ or gunicorn_ and tell Bottle to use that instead of the single-threaded wsgiref server::
4747

docs/development.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ The bottle `development repository <https://github.com/bottlepy/bottle>`_ and th
2020

2121
* **git:** ``git clone git://github.com/bottlepy/bottle.git``
2222
* **git/https:** ``git clone https://github.com/bottlepy/bottle.git``
23-
* **Download:** Development branch as `tar archive <http://github.com/bottlepy/bottle/tarball/master>`_ or `zip file <http://github.com/bottlepy/bottle/zipball/master>`_.
23+
* **Download:** Development branch as `tar archive <https://github.com/bottlepy/bottle/tarball/master>`_ or `zip file <https://github.com/bottlepy/bottle/zipball/master>`_.
2424

2525

2626
Releases and Updates
2727
--------------------
2828

29-
Bottle is released at irregular intervals and distributed through `PyPI <http://pypi.python.org/pypi/bottle>`_. Release candidates are only available from the git repository mentioned above. Debian and many other Linux distributions offer packages.
29+
Bottle is released at irregular intervals and distributed through `PyPI <https://pypi.python.org/pypi/bottle>`_. Release candidates are only available from the git repository mentioned above. Debian and many other Linux distributions offer packages.
3030

3131
The Bottle version number splits into three parts (**major.minor.patch**) but does not follow the rules of `SemVer <https://semver.org/>`_. Instead, you can usually rely on the following rules:
3232

docs/faq.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.. currentmodule:: bottle
22

33
.. _beaker: https://beaker.readthedocs.io/en/latest/
4-
.. _mod_python: http://www.modpython.org/
5-
.. _mod_wsgi: http://code.google.com/p/modwsgi/
4+
.. _mod_python: https://www.modpython.org/
5+
.. _mod_wsgi: https://code.google.com/p/modwsgi/
66
.. _paste: https://pythonpaste.readthedocs.io/
77
.. _pylons: https://pylonsproject.org/
8-
.. _gevent: http://www.gevent.org/
9-
.. _heroku: http://heroku.com
8+
.. _gevent: https://www.gevent.org/
9+
.. _heroku: https://heroku.com
1010
.. _django: https://www.djangoproject.com/
1111
.. _werkzeug: https://werkzeug.palletsprojects.com/en/3.0.x/
1212

@@ -213,7 +213,7 @@ or add a ``before_request`` hook to strip the trailing slashes::
213213

214214
.. rubric:: Footnotes
215215

216-
.. [1] Because they are. See <http://www.ietf.org/rfc/rfc3986.txt>
216+
.. [1] Because they are. See <https://www.ietf.org/rfc/rfc3986.txt>
217217
218218
219219
Keep-alive requests
@@ -300,11 +300,11 @@ Heroku_, a popular cloud application platform now provides support
300300
for running Python applications on their infrastructure.
301301

302302
This recipe is based upon the `Heroku Quickstart
303-
<http://devcenter.heroku.com/articles/quickstart>`_,
303+
<https://devcenter.heroku.com/articles/quickstart>`_,
304304
with Bottle specific code replacing the
305-
`Write Your App <http://devcenter.heroku.com/articles/python#write_your_app>`_
305+
`Write Your App <https://devcenter.heroku.com/articles/python#write_your_app>`_
306306
section of the `Getting Started with Python on Heroku/Cedar
307-
<http://devcenter.heroku.com/articles/python>`_ guide::
307+
<https://devcenter.heroku.com/articles/python>`_ guide::
308308

309309
import os
310310
from bottle import route, run

0 commit comments

Comments
 (0)