KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/test/test_httplib.pyc
mò
‚=5Dc@s dkZdkZdkZdklZdklZdfd„ƒYZdeifd„ƒYZdefd„ƒYZ	d	„Zd
„Z
dd„ZeƒdS(N(sTestCase(stest_supportt
FakeSocketcBs,tZeid„Zd„Zdd„ZRS(NcCs||_||_dS(N(ttexttselft	fileclass(RRR((t)/usr/lib64/python2.4/test/test_httplib.pyt__init__
s	cCs
||_dS(N(tdataR(RR((RtsendallscCs:|djo|djotiƒ‚n|i|iƒS(Ntrtrb(tmodethttplibtUnimplementedFileModeRRR(RR
tbufsize((Rtmakefiles(t__name__t
__module__tStringIORRtNoneR(((RR	s	t
NoEOFStringIOcBs&tZdZdd„Zed„ZRS(s¨Like StringIO, but raises AssertionError on EOF.

    This is used below to test that httplib doesn't try to read
    more from the underlying file than it should.
    iÿÿÿÿcCs6tii||ƒ}|djotdƒ‚n|S(Ntscaller tried to read past EOF(RtreadRtnRtAssertionError(RRR((RRs
cCs6tii||ƒ}|djotdƒ‚n|S(NRscaller tried to read past EOF(RtreadlineRtlengthRR(RRR((RR"s
(RRt__doc__RRR(((RRstHeaderTestscBstZd„ZRS(NcCsØdk}dtfd„ƒY}x²ttfD]¤}x›dD]“}|idƒ}t	dƒ|_
|ƒ|_d}h}|ott|ƒƒ||<n|id	d
||ƒ|i|ii|iƒdƒq9Wq,WdS(
NtHeaderCountingBuffercBstZd„Zd„ZRS(NcCs
h|_dS(N(Rtcount(R((RR1scCsp|idƒ}t|ƒdjo:|diƒ}|ii|dƒ|i|cd7<nt	i
||ƒdS(Nt:ii(titemtsplittkvtlentlowertlcKeyRRt
setdefaulttlisttappend(RRR$R!((RR'3s(RRRR'(((RR0s	sContent-lengthtHostsAccept-encodingsexample.comtblahblahblahtspamspamspamtPOSTt/i(sContent-lengthR(sAccept-encoding(RR&RtTruetFalsetexplicit_headertheadertHTTPConnectiontconnRtsockt_buffertbodytheaderststrR"trequestRtassertEqualRR#(RR5RR6R0R2R/R((Rttest_auto_headers*s	
(RRR:(((RR)scCsktiƒ}ti}z|t_tƒWd|t_X|iƒ}x"|idƒD]}|i
ƒGHqRWdS(Ns
(Rtbuftsyststdoutt_stdoutt_testtgetvaluetsR tlinetstrip(R>RARBR;((RttestMs		
c
CsMd}t|ƒ}ti|dƒ}|iƒ|iƒGH|iƒd}t|ƒ}ti|dƒ}y|iƒWnti	j
odGHnXdGHxDdD]<}yti|ƒ}Wnti
j
odGHqŸXd	GHqŸWx¯ddd d!fD]›\}}}yti|ƒ}Wnti
j
odGHnX|i}||ijotd||if‚n||ijotd||if‚qòqòWd}d}t|ƒ}	ti|	dƒ}
|
iƒ|
idƒ}||jo
td‚ntdtƒ}ti|dddƒ}|iƒ|iƒdjo
td‚n|iƒdS("NsHTTP/1.1 200 Ok

TextisHTTP/1.1 400.100 Not Ok

Texts BadStatusLine raised as expectedsExpect BadStatusLineswww.python.org:abcswww.python.org:sInvalidURL raised as expectedsExpect InvalidURLs[fe80::207:e9ff:fe9b]:8000sfe80::207:e9ff:fe9bi@swww.python.org:80swww.python.orgiPs[fe80::207:e9ff:fe9b]sInvalidURL raised erroneouslysHost incorrectly parsedsPort incorrectly parseds¨HTTP/1.1 200 OK
Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"
Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"

No body
srCustomer="WILE_E_COYOTE"; Version="1"; Path="/acme", Part_Number="Rocket_Launcher_0001"; Version="1"; Path="/acme"s
Set-Cookies&multiple headers not combined properlys*HTTP/1.1 200 OK
Content-Length: 14432

tmethodtHEADRs)Did not expect response from HEAD request(swww.python.org:abcswww.python.org:(s[fe80::207:e9ff:fe9b]:8000sfe80::207:e9ff:fe9bi@(swww.python.org:80swww.python.orgiP(swww.python.orgswww.python.orgiP(s[fe80::207:e9ff:fe9b]sfe80::207:e9ff:fe9biP(R5RR3RtHTTPResponsetresptbeginRtcloset
BadStatusLinethptHTTPtht
InvalidURLtpthttpt_conntcthostRtportRthdrRARt	getheadertcookiesR(
R5RQRVRXRNRLRSR3RPRARRRH((RR?[s^



	
	


	

cCstg}ti|ŒdS(N(Rtteststtest_supporttrun_unittest(tverboseRY((Rt	test_main¤s	(
RRR<tunittesttTestCaseRDRZRRRR?RR](RZR_RRR?RRRR<R]RD((Rt?s			


$		I

Anon7 - 2021