66msgstr ""
77"Project-Id-Version : Python 3.13\n "
88"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 "
1010"PO-Revision-Date : 2018-05-23 16:03+0000\n "
1111"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
1212"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -541,134 +541,63 @@ msgid ""
541541"attribute :attr:`index_pages`."
542542msgstr ""
543543
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
616545msgid ""
617546"This class is used to serve either files or output of CGI scripts from the "
618547"current directory and below. Note that mapping HTTP hierarchic structure to "
619548"local directory structure is exactly as in :class:`SimpleHTTPRequestHandler`."
620549msgstr ""
621550
622- #: ../../library/http.server.rst:473
551+ #: ../../library/http.server.rst:430
623552msgid ""
624553"CGI scripts run by the :class:`CGIHTTPRequestHandler` class cannot execute "
625554"redirects (HTTP code 302), because code 200 (script output follows) is sent "
626555"prior to execution of the CGI script. This pre-empts the status code."
627556msgstr ""
628557
629- #: ../../library/http.server.rst:478
558+ #: ../../library/http.server.rst:435
630559msgid ""
631560"The class will however, run the CGI script, instead of serving it as a file, "
632561"if it guesses it to be a CGI script. Only directory-based CGI are used --- "
633562"the other common server configuration is to treat special extensions as "
634563"denoting CGI scripts."
635564msgstr ""
636565
637- #: ../../library/http.server.rst:483
566+ #: ../../library/http.server.rst:440
638567msgid ""
639568"The :func:`do_GET` and :func:`do_HEAD` functions are modified to run CGI "
640569"scripts and serve the output, instead of serving files, if the request leads "
641570"to somewhere below the ``cgi_directories`` path."
642571msgstr ""
643572
644- #: ../../library/http.server.rst:487
573+ #: ../../library/http.server.rst:444
645574msgid "The :class:`CGIHTTPRequestHandler` defines the following data member:"
646575msgstr ""
647576
648- #: ../../library/http.server.rst:491
577+ #: ../../library/http.server.rst:448
649578msgid ""
650579"This defaults to ``['/cgi-bin', '/htbin']`` and describes directories to "
651580"treat as containing CGI scripts."
652581msgstr ""
653582
654- #: ../../library/http.server.rst:494
583+ #: ../../library/http.server.rst:451
655584msgid "The :class:`CGIHTTPRequestHandler` defines the following method:"
656585msgstr ""
657586
658- #: ../../library/http.server.rst:498
587+ #: ../../library/http.server.rst:455
659588msgid ""
660589"This method serves the ``'POST'`` request type, only allowed for CGI "
661590"scripts. Error 501, \" Can only POST to CGI scripts\" , is output when trying "
662591"to POST to a non-CGI url."
663592msgstr ""
664593
665- #: ../../library/http.server.rst:502
594+ #: ../../library/http.server.rst:459
666595msgid ""
667596"Note that CGI scripts will be run with UID of user nobody, for security "
668597"reasons. Problems with the CGI script will be translated to error 403."
669598msgstr ""
670599
671- #: ../../library/http.server.rst:507
600+ #: ../../library/http.server.rst:464
672601msgid ""
673602":class:`CGIHTTPRequestHandler` is being removed in 3.15. CGI has not been "
674603"considered a good way to do things for well over a decade. This code has "
@@ -677,41 +606,110 @@ msgid ""
677606"server-security>`."
678607msgstr ""
679608
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+
680662#: ../../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
681678msgid ""
682679":class:`CGIHTTPRequestHandler` can be enabled in the command line by passing "
683680"the ``--cgi`` option::"
684681msgstr ""
685682
686- #: ../../library/http.server.rst:516
683+ #: ../../library/http.server.rst:532
687684msgid "python -m http.server --cgi"
688685msgstr "python -m http.server --cgi"
689686
690- #: ../../library/http.server.rst:520
687+ #: ../../library/http.server.rst:536
691688msgid ""
692689":mod:`http.server` command line ``--cgi`` support is being removed because :"
693690"class:`CGIHTTPRequestHandler` is being removed."
694691msgstr ""
695692
696- #: ../../library/http.server.rst:525
693+ #: ../../library/http.server.rst:541
697694msgid ""
698- ":class:`CGIHTTPRequestHandler` and the ``--cgi`` command line option are not "
695+ ":class:`CGIHTTPRequestHandler` and the ``--cgi`` command- line option are not "
699696"intended for use by untrusted clients and may be vulnerable to exploitation. "
700697"Always use within a secure environment."
701698msgstr ""
702699
703- #: ../../library/http.server.rst:532
704- msgid "Security Considerations"
700+ #: ../../library/http.server.rst:549
701+ #, fuzzy
702+ msgid "Security considerations"
705703msgstr "安全性注意事項"
706704
707- #: ../../library/http.server.rst:536
705+ #: ../../library/http.server.rst:553
708706msgid ""
709707":class:`SimpleHTTPRequestHandler` will follow symbolic links when handling "
710708"requests, this makes it possible for files outside of the specified "
711709"directory to be served."
712710msgstr ""
713711
714- #: ../../library/http.server.rst:540
712+ #: ../../library/http.server.rst:557
715713msgid ""
716714"Earlier versions of Python did not scrub control characters from the log "
717715"messages emitted to stderr from ``python -m http.server`` or the default :"
@@ -720,7 +718,7 @@ msgid ""
720718"codes to your terminal."
721719msgstr ""
722720
723- #: ../../library/http.server.rst:546
721+ #: ../../library/http.server.rst:563
724722msgid "Control characters are scrubbed in stderr logs."
725723msgstr ""
726724
@@ -748,10 +746,19 @@ msgstr "URL(統一資源定位器)"
748746msgid "httpd"
749747msgstr "httpd"
750748
751- #: ../../library/http.server.rst:534
749+ #: ../../library/http.server.rst:551
752750msgid "http.server"
753751msgstr "http.server"
754752
755- #: ../../library/http.server.rst:534
753+ #: ../../library/http.server.rst:551
756754msgid "security"
757755msgstr "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