From 3bbe869dd7afbf089f32eed7f2ae17e8978c8035 Mon Sep 17 00:00:00 2001 From: Bruce Sutherland Date: Wed, 21 Jan 2015 14:09:30 +0900 Subject: [PATCH 1/4] Clarify contents of request properties. Change URL to IRI and update examples to include extended characters. --- docs/api.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 6c2ab0cf..c7fdda4a 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -92,24 +92,24 @@ Incoming Request Data .. attribute:: base_url .. attribute:: url_root - Provides different ways to look at the current URL. Imagine your - application is listening on the following URL:: + Provides different ways to look at the current `IRI`_. Imagine your + application is listening on the following IRI:: http://www.example.com/myapplication - And a user requests the following URL:: + And a user requests the following IRI:: - http://www.example.com/myapplication/page.html?x=y + http://www.example.com/myapplication/日本/page.html?x=y In this case the values of the above mentioned attributes would be the following: ============= ====================================================== - `path` ``/page.html`` - `full_path` ``/page.html?x=y`` + `path` ``/日本/page.html`` + `full_path` ``/日本/page.html?x=y`` `script_root` ``/myapplication`` - `base_url` ``http://www.example.com/myapplication/page.html`` - `url` ``http://www.example.com/myapplication/page.html?x=y`` + `base_url` ``http://www.example.com/myapplication/日本/page.html`` + `url` ``http://www.example.com/myapplication/日本/page.html?x=y`` `url_root` ``http://www.example.com/myapplication/`` ============= ====================================================== From 77141c1eca6086ed6ab102f872f6f2bc04e7f5fd Mon Sep 17 00:00:00 2001 From: Bruce Sutherland Date: Wed, 21 Jan 2015 15:00:38 +0900 Subject: [PATCH 2/4] Update api.rst Changed Japanese text to pi symbol, emphasize that values are unicode. --- docs/api.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index c7fdda4a..42e42c99 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -99,18 +99,18 @@ Incoming Request Data And a user requests the following IRI:: - http://www.example.com/myapplication/日本/page.html?x=y + http://www.example.com/myapplication/π/page.html?x=y In this case the values of the above mentioned attributes would be the following: ============= ====================================================== - `path` ``/日本/page.html`` - `full_path` ``/日本/page.html?x=y`` - `script_root` ``/myapplication`` - `base_url` ``http://www.example.com/myapplication/日本/page.html`` - `url` ``http://www.example.com/myapplication/日本/page.html?x=y`` - `url_root` ``http://www.example.com/myapplication/`` + `path` ``u'/π/page.html'`` + `full_path` ``u'/π/page.html?x=y'`` + `script_root` ``u'/myapplication'`` + `base_url` ``u'http://www.example.com/myapplication/π/page.html'`` + `url` ``u'http://www.example.com/myapplication/π/page.html?x=y'`` + `url_root` ``u'http://www.example.com/myapplication/'`` ============= ====================================================== .. attribute:: is_xhr From 871077c81c02ffa3a5e4ebb9786fe43dcc433c2d Mon Sep 17 00:00:00 2001 From: Bruce Sutherland Date: Wed, 21 Jan 2015 20:52:42 +0900 Subject: [PATCH 3/4] Show requested URI as suggested by untitaker. --- docs/api.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 42e42c99..4094b7ce 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -93,13 +93,13 @@ Incoming Request Data .. attribute:: url_root Provides different ways to look at the current `IRI`_. Imagine your - application is listening on the following IRI:: + application is listening on the following application root:: http://www.example.com/myapplication - And a user requests the following IRI:: + And a user requests the following URI:: - http://www.example.com/myapplication/π/page.html?x=y + http://www.example.com/myapplication/%CF%80/page.html?x=y In this case the values of the above mentioned attributes would be the following: From 0d86a89420c1d692e659a5c9b0fc0cd5d65ee91a Mon Sep 17 00:00:00 2001 From: Bruce Sutherland Date: Thu, 22 Jan 2015 09:12:18 +0900 Subject: [PATCH 4/4] Wrap text. --- docs/api.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api.rst b/docs/api.rst index 4094b7ce..8963a74b 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -92,7 +92,8 @@ Incoming Request Data .. attribute:: base_url .. attribute:: url_root - Provides different ways to look at the current `IRI`_. Imagine your + Provides different ways to look at the current + `IRI`_. Imagine your application is listening on the following application root:: http://www.example.com/myapplication