Browse Source

[trac547]
- changed the redirection
302 would be responded only when it's requested with '/' and there is a Host
header, in other cases, 404(NotFound) would be responded.
- added more description into the document according to the above change
- added grammatical fix into the document
- regenerated the manpage

Naoki Kambe 14 years ago
parent
commit
5a6f9f8c21

File diff suppressed because it is too large
+ 2 - 2
src/bin/stats/b10-stats-httpd.8


+ 6 - 2
src/bin/stats/b10-stats-httpd.xml

@@ -65,7 +65,11 @@
       and XSL (Extensible Stylesheet Language). The XML document is the
       statistics data of BIND 10, The XSD document is the data schema of it,
       and The XSL document is the style sheet to be showed for the web
-      browsers. Please see the manual and the spec file
+      browsers. There is different URL for each document. But please note that
+      you would be redirected to the URL of XML document if you request the URL
+      of the root document. For example, you would be redirected to
+      http://127.0.0.1:8000/bind10/statistics/xml if you request
+      http://127.0.0.1:8000/. Please see the manual and the spec file
       of <command>b10-stats</command> for more details about the items of BIND
       10 statistics. The server uses CC session in communication
       with <command>b10-stats</command>. CC session is provided
@@ -145,7 +149,7 @@
 	    is http://127.0.0.1:8000/bind10/statistics/xml. And also IPv6
 	    addresses can be configured and they works in the runtime
 	    environment for dual stack. You can change the settings
-	    through <refentrytitle>bindctl</refentrytitle><manvolnum>8</manvolnum>
+	    through <refentrytitle>bindctl</refentrytitle><manvolnum>8</manvolnum>.
 	  </para>
         </listitem>
       </varlistentry>

+ 2 - 2
src/bin/stats/stats_httpd.py.in

@@ -83,8 +83,8 @@ class HttpHandler(http.server.BaseHTTPRequestHandler):
             elif self.path == XSL_URL_PATH:
                 body = self.server.xsl_handler()
             else:
-                if 'Host' in self.headers.keys():
-                    # redirect to XML URL
+                if self.path == '/' and 'Host' in self.headers.keys():
+                    # redirect to XML URL only when requested with '/'
                     self.send_response(302)
                     self.send_header(
                         "Location",