Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
587c98c8
Kaydet (Commit)
587c98c8
authored
Mar 17, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #430706: Persistent connections in BaseHTTPServer.
üst
8ec03e05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
libbasehttp.tex
Doc/lib/libbasehttp.tex
+16
-6
BaseHTTPServer.py
Lib/BaseHTTPServer.py
+0
-0
SimpleHTTPServer.py
Lib/SimpleHTTPServer.py
+3
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Doc/lib/libbasehttp.tex
Dosyayı görüntüle @
587c98c8
...
...
@@ -123,9 +123,12 @@ class variable.
\end{memberdesc}
\begin{memberdesc}
{
protocol
_
version
}
This specifies the HTTP protocol version used in responses.
Typically, this should not be overridden. Defaults to
\code
{
'HTTP/1.0'
}
.
This specifies the HTTP protocol version used in responses. If set
to
\code
{
'HTTP/1.1'
}
, the server will permit HTTP persistent
connections; however, your server
\emph
{
must
}
then include an
accurate
\code
{
Content-Length
}
header (using
\method
{
send
_
header()
}
)
in all of its responses to clients. For backwards compatibility,
the setting defaults to
\code
{
'HTTP/1.0'
}
.
\end{memberdesc}
\begin{memberdesc}
{
MessageClass
}
...
...
@@ -148,9 +151,16 @@ error response, and \var{longmessage} as the \var{explain} key
A
\class
{
BaseHTTPRequestHandler
}
instance has the following methods:
\begin{methoddesc}
{
handle
}{}
Overrides the superclass'
\method
{
handle()
}
method to provide the
specific handler behavior. This method will parse and dispatch
the request to the appropriate
\method
{
do
_
*()
}
method.
Calls
\method
{
handle
_
one
_
request()
}
once (or, if persistent connections
are enabled, multiple times) to handle incoming HTTP requests.
You should never need to override it; instead, implement appropriate
\method
{
do
_
*()
}
methods.
\end{methoddesc}
\begin{methoddesc}
{
handle
_
one
_
request
}{}
This method will parse and dispatch
the request to the appropriate
\method
{
do
_
*()
}
method. You should
never need to override it.
\end{methoddesc}
\begin{methoddesc}
{
send
_
error
}{
code
\optional
{
, message
}}
...
...
Lib/BaseHTTPServer.py
Dosyayı görüntüle @
587c98c8
This diff is collapsed.
Click to expand it.
Lib/SimpleHTTPServer.py
Dosyayı görüntüle @
587c98c8
...
...
@@ -82,6 +82,7 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return
None
self
.
send_response
(
200
)
self
.
send_header
(
"Content-type"
,
ctype
)
self
.
send_header
(
"Content-Length"
,
str
(
os
.
fstat
(
f
.
fileno
())[
6
]))
self
.
end_headers
()
return
f
...
...
@@ -115,9 +116,11 @@ class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
# Note: a link to a directory displays with @ and links with /
f
.
write
(
'<li><a href="
%
s">
%
s</a>
\n
'
%
(
linkname
,
displayname
))
f
.
write
(
"</ul>
\n
<hr>
\n
"
)
length
=
f
.
tell
()
f
.
seek
(
0
)
self
.
send_response
(
200
)
self
.
send_header
(
"Content-type"
,
"text/html"
)
self
.
send_header
(
"Content-Length"
,
str
(
length
))
self
.
end_headers
()
return
f
...
...
Misc/NEWS
Dosyayı görüntüle @
587c98c8
...
...
@@ -44,6 +44,9 @@ Extension modules
Library
- The BaseHTTPServer implements now optionally HTTP/1.1 persistent
connections.
- socket module: the SSL support was broken out of the main
_socket module C helper and placed into a new _ssl helper
which now gets imported by socket.py if available and working.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment