6
6
msgstr ""
7
7
"Project-Id-Version : Python 3.13\n "
8
8
"Report-Msgid-Bugs-To : \n "
9
- "POT-Creation-Date : 2024-10-11 00:13 +0000\n "
9
+ "POT-Creation-Date : 2025-03-16 00:15 +0000\n "
10
10
"PO-Revision-Date : 2018-05-23 16:03+0000\n "
11
11
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
12
12
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -541,134 +541,63 @@ msgid ""
541
541
"attribute :attr:`index_pages`."
542
542
msgstr ""
543
543
544
- #: ../../library/http.server.rst:423
545
- msgid ""
546
- ":mod:`http.server` can also be invoked directly using the :option:`-m` "
547
- "switch of the interpreter. Similar to the previous example, this serves "
548
- "files relative to the current directory::"
549
- msgstr ""
550
-
551
- #: ../../library/http.server.rst:427
552
- msgid "python -m http.server"
553
- msgstr "python -m http.server"
554
-
555
- #: ../../library/http.server.rst:429
556
- msgid ""
557
- "The server listens to port 8000 by default. The default can be overridden by "
558
- "passing the desired port number as an argument::"
559
- msgstr ""
560
-
561
- #: ../../library/http.server.rst:432
562
- msgid "python -m http.server 9000"
563
- msgstr "python -m http.server 9000"
564
-
565
- #: ../../library/http.server.rst:434
566
- msgid ""
567
- "By default, the server binds itself to all interfaces. The option ``-b/--"
568
- "bind`` specifies a specific address to which it should bind. Both IPv4 and "
569
- "IPv6 addresses are supported. For example, the following command causes the "
570
- "server to bind to localhost only::"
571
- msgstr ""
572
-
573
- #: ../../library/http.server.rst:439
574
- msgid "python -m http.server --bind 127.0.0.1"
575
- msgstr "python -m http.server --bind 127.0.0.1"
576
-
577
- #: ../../library/http.server.rst:441
578
- msgid "Added the ``--bind`` option."
579
- msgstr "新增 ``--bind`` 選項。"
580
-
581
- #: ../../library/http.server.rst:444
582
- msgid "Support IPv6 in the ``--bind`` option."
583
- msgstr "於 ``--bind`` 選項中支援 IPv6。"
584
-
585
- #: ../../library/http.server.rst:447
586
- msgid ""
587
- "By default, the server uses the current directory. The option ``-d/--"
588
- "directory`` specifies a directory to which it should serve the files. For "
589
- "example, the following command uses a specific directory::"
590
- msgstr ""
591
-
592
- #: ../../library/http.server.rst:451
593
- msgid "python -m http.server --directory /tmp/"
594
- msgstr "python -m http.server --directory /tmp/"
595
-
596
- #: ../../library/http.server.rst:453
597
- msgid "Added the ``--directory`` option."
598
- msgstr "新增 ``--directory`` 選項。"
599
-
600
- #: ../../library/http.server.rst:456
601
- msgid ""
602
- "By default, the server is conformant to HTTP/1.0. The option ``-p/--"
603
- "protocol`` specifies the HTTP version to which the server is conformant. For "
604
- "example, the following command runs an HTTP/1.1 conformant server::"
605
- msgstr ""
606
-
607
- #: ../../library/http.server.rst:460
608
- msgid "python -m http.server --protocol HTTP/1.1"
609
- msgstr "python -m http.server --protocol HTTP/1.1"
610
-
611
- #: ../../library/http.server.rst:462
612
- msgid "Added the ``--protocol`` option."
613
- msgstr "新增 ``--protocol`` 選項。"
614
-
615
- #: ../../library/http.server.rst:467
544
+ #: ../../library/http.server.rst:424
616
545
msgid ""
617
546
"This class is used to serve either files or output of CGI scripts from the "
618
547
"current directory and below. Note that mapping HTTP hierarchic structure to "
619
548
"local directory structure is exactly as in :class:`SimpleHTTPRequestHandler`."
620
549
msgstr ""
621
550
622
- #: ../../library/http.server.rst:473
551
+ #: ../../library/http.server.rst:430
623
552
msgid ""
624
553
"CGI scripts run by the :class:`CGIHTTPRequestHandler` class cannot execute "
625
554
"redirects (HTTP code 302), because code 200 (script output follows) is sent "
626
555
"prior to execution of the CGI script. This pre-empts the status code."
627
556
msgstr ""
628
557
629
- #: ../../library/http.server.rst:478
558
+ #: ../../library/http.server.rst:435
630
559
msgid ""
631
560
"The class will however, run the CGI script, instead of serving it as a file, "
632
561
"if it guesses it to be a CGI script. Only directory-based CGI are used --- "
633
562
"the other common server configuration is to treat special extensions as "
634
563
"denoting CGI scripts."
635
564
msgstr ""
636
565
637
- #: ../../library/http.server.rst:483
566
+ #: ../../library/http.server.rst:440
638
567
msgid ""
639
568
"The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI "
640
569
"scripts and serve the output, instead of serving files, if the request leads "
641
570
"to somewhere below the ``cgi_directories`` path."
642
571
msgstr ""
643
572
644
- #: ../../library/http.server.rst:487
573
+ #: ../../library/http.server.rst:444
645
574
msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:"
646
575
msgstr ""
647
576
648
- #: ../../library/http.server.rst:491
577
+ #: ../../library/http.server.rst:448
649
578
msgid ""
650
579
"This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to "
651
580
"treat as containing CGI scripts."
652
581
msgstr ""
653
582
654
- #: ../../library/http.server.rst:494
583
+ #: ../../library/http.server.rst:451
655
584
msgid "The :class:`CGIHTTPRequestHandler` defines the following method:"
656
585
msgstr ""
657
586
658
- #: ../../library/http.server.rst:498
587
+ #: ../../library/http.server.rst:455
659
588
msgid ""
660
589
"This method serves the ``'POST'`` request type, only allowed for CGI "
661
590
"scripts. Error 501, \" Can only POST to CGI scripts\" , is output when trying "
662
591
"to POST to a non-CGI url."
663
592
msgstr ""
664
593
665
- #: ../../library/http.server.rst:502
594
+ #: ../../library/http.server.rst:459
666
595
msgid ""
667
596
"Note that CGI scripts will be run with UID of user nobody, for security "
668
597
"reasons. Problems with the CGI script will be translated to error 403."
669
598
msgstr ""
670
599
671
- #: ../../library/http.server.rst:507
600
+ #: ../../library/http.server.rst:464
672
601
msgid ""
673
602
":class:`CGIHTTPRequestHandler` is being removed in 3.15. CGI has not been "
674
603
"considered a good way to do things for well over a decade. This code has "
@@ -677,41 +606,110 @@ msgid ""
677
606
"server-security>`."
678
607
msgstr ""
679
608
609
+ #: ../../library/http.server.rst:474
610
+ msgid "Command-line interface"
611
+ msgstr ""
612
+
613
+ #: ../../library/http.server.rst:476
614
+ msgid ""
615
+ ":mod:`http.server` can also be invoked directly using the :option:`-m` "
616
+ "switch of the interpreter. The following example illustrates how to serve "
617
+ "files relative to the current directory::"
618
+ msgstr ""
619
+
620
+ #: ../../library/http.server.rst:480
621
+ #, fuzzy
622
+ msgid "python -m http.server [OPTIONS] [port]"
623
+ msgstr "python -m http.server"
624
+
625
+ #: ../../library/http.server.rst:482
626
+ msgid "The following options are accepted:"
627
+ msgstr ""
628
+
629
+ #: ../../library/http.server.rst:488
630
+ msgid ""
631
+ "The server listens to port 8000 by default. The default can be overridden by "
632
+ "passing the desired port number as an argument::"
633
+ msgstr ""
634
+
635
+ #: ../../library/http.server.rst:491
636
+ msgid "python -m http.server 9000"
637
+ msgstr "python -m http.server 9000"
638
+
639
+ #: ../../library/http.server.rst:495
640
+ msgid ""
641
+ "Specifies a specific address to which it should bind. Both IPv4 and IPv6 "
642
+ "addresses are supported. By default, the server binds itself to all "
643
+ "interfaces. For example, the following command causes the server to bind to "
644
+ "localhost only::"
645
+ msgstr ""
646
+
647
+ #: ../../library/http.server.rst:500
648
+ msgid "python -m http.server --bind 127.0.0.1"
649
+ msgstr "python -m http.server --bind 127.0.0.1"
650
+
651
+ #: ../../library/http.server.rst:504
652
+ msgid "Support IPv6 in the ``--bind`` option."
653
+ msgstr "於 ``--bind`` 選項中支援 IPv6。"
654
+
655
+ #: ../../library/http.server.rst:509
656
+ msgid ""
657
+ "Specifies a directory to which it should serve the files. By default, the "
658
+ "server uses the current directory. For example, the following command uses a "
659
+ "specific directory::"
660
+ msgstr ""
661
+
680
662
#: ../../library/http.server.rst:513
663
+ msgid "python -m http.server --directory /tmp/"
664
+ msgstr "python -m http.server --directory /tmp/"
665
+
666
+ #: ../../library/http.server.rst:519
667
+ msgid ""
668
+ "Specifies the HTTP version to which the server is conformant. By default, "
669
+ "the server is conformant to HTTP/1.0. For example, the following command "
670
+ "runs an HTTP/1.1 conformant server::"
671
+ msgstr ""
672
+
673
+ #: ../../library/http.server.rst:523
674
+ msgid "python -m http.server --protocol HTTP/1.1"
675
+ msgstr "python -m http.server --protocol HTTP/1.1"
676
+
677
+ #: ../../library/http.server.rst:529
681
678
msgid ""
682
679
":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing "
683
680
"the ``--cgi`` option::"
684
681
msgstr ""
685
682
686
- #: ../../library/http.server.rst:516
683
+ #: ../../library/http.server.rst:532
687
684
msgid "python -m http.server --cgi"
688
685
msgstr "python -m http.server --cgi"
689
686
690
- #: ../../library/http.server.rst:520
687
+ #: ../../library/http.server.rst:536
691
688
msgid ""
692
689
":mod:`http.server` command line ``--cgi`` support is being removed because :"
693
690
"class:`CGIHTTPRequestHandler` is being removed."
694
691
msgstr ""
695
692
696
- #: ../../library/http.server.rst:525
693
+ #: ../../library/http.server.rst:541
697
694
msgid ""
698
- ":class:`CGIHTTPRequestHandler` and the ``--cgi`` command line option are not "
695
+ ":class:`CGIHTTPRequestHandler` and the ``--cgi`` command- line option are not "
699
696
"intended for use by untrusted clients and may be vulnerable to exploitation. "
700
697
"Always use within a secure environment."
701
698
msgstr ""
702
699
703
- #: ../../library/http.server.rst:532
704
- msgid "Security Considerations"
700
+ #: ../../library/http.server.rst:549
701
+ #, fuzzy
702
+ msgid "Security considerations"
705
703
msgstr "安全性注意事項"
706
704
707
- #: ../../library/http.server.rst:536
705
+ #: ../../library/http.server.rst:553
708
706
msgid ""
709
707
":class:`SimpleHTTPRequestHandler` will follow symbolic links when handling "
710
708
"requests, this makes it possible for files outside of the specified "
711
709
"directory to be served."
712
710
msgstr ""
713
711
714
- #: ../../library/http.server.rst:540
712
+ #: ../../library/http.server.rst:557
715
713
msgid ""
716
714
"Earlier versions of Python did not scrub control characters from the log "
717
715
"messages emitted to stderr from ``python -m http.server`` or the default :"
@@ -720,7 +718,7 @@ msgid ""
720
718
"codes to your terminal."
721
719
msgstr ""
722
720
723
- #: ../../library/http.server.rst:546
721
+ #: ../../library/http.server.rst:563
724
722
msgid "Control characters are scrubbed in stderr logs."
725
723
msgstr ""
726
724
@@ -748,10 +746,19 @@ msgstr "URL(統一資源定位器)"
748
746
msgid "httpd"
749
747
msgstr "httpd"
750
748
751
- #: ../../library/http.server.rst:534
749
+ #: ../../library/http.server.rst:551
752
750
msgid "http.server"
753
751
msgstr "http.server"
754
752
755
- #: ../../library/http.server.rst:534
753
+ #: ../../library/http.server.rst:551
756
754
msgid "security"
757
755
msgstr "security(安全)"
756
+
757
+ #~ msgid "Added the ``--bind`` option."
758
+ #~ msgstr "新增 ``--bind`` 選項。"
759
+
760
+ #~ msgid "Added the ``--directory`` option."
761
+ #~ msgstr "新增 ``--directory`` 選項。"
762
+
763
+ #~ msgid "Added the ``--protocol`` option."
764
+ #~ msgstr "新增 ``--protocol`` 選項。"
0 commit comments