aamine
e3ab724e00
* lib/net/http.rb: 4xx raises Net::ProtoServerError, 5xx raises Net::ProtoFatalError (for backward compatibility).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-08 23:29:07 +00:00
aamine
15911a95bf
* lib/net/http.rb: unify coding style.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:13:17 +00:00
aamine
3eea2999e7
* lib/net/http.rb: should not overwrite Host: header. (Original patch is contributed by sean@ruby-lang.org)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 11:01:22 +00:00
aamine
87239525c1
* lib/net/http.rb: support Proxy-Authorization. (Original patch is contributed by Alexander Bokovoy)
...
* lib/net/http.rb: should not overwrite Host: header. (Original patch is contributed by sean@ruby-lang.org )
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-21 10:59:50 +00:00
matz
66d1582c07
* object.c (rb_str_to_dbl): RString ptr might be NULL.
...
* object.c (rb_cstr_to_dbl): p pointer might be NULL.
* bignum.c (rb_str_to_inum): RString ptr might be NULL.
* bignum.c (rb_cstr_to_inum): str pointer might be NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 07:27:00 +00:00
aamine
fa848fb6fd
* lib/net/http.rb: rename HTTP.get_uri get_response.
...
* lib/net/http.rb: HTTP.get_print accepts URI objects.
* lib/net/http.rb: HTTP.get did not work with URI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11 21:33:38 +00:00
aamine
1ea1fbe85d
* lib/net/http.rb: HTTP.get accepts URI.
...
* lib/net/http.rb: add some HTTP 1.1 response codes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-26 11:18:02 +00:00
aamine
d80b8cd59e
modify typo.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-22 12:54:11 +00:00
aamine
d3b66ccf45
* lib/net/protocol.rb: set read_timeout dynamically.
...
* lib/net/http.rb: @@newimpl is always true in the main trunk.
* lib/net/http.rb: HTTP.port -> default_port
* lib/net/http.rb: HTTPResponse.read_response_status -> read_status_line
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-22 12:10:58 +00:00
aamine
19f7f6ea12
aamine
...
* lib/net/protocol.rb: rename Protocol.port to default_port.
* lib/net/smtp.rb: ditto.
* lib/net/pop.rb: ditto.
* lib/net/http.rb: ditto.
* lib/net/protocol.rb: rename BufferedSocket class to InternetMessageIO.
* lib/net/smtp.rb: ditto.
* lib/net/pop.rb: ditto.
* lib/net/http.rb: ditto.
* lib/net/protocol.rb: rename InternetMessageIO#write_pendstr to write_message.
* lib/net/smtp.rb: ditto.
* lib/net/protocol.rb: new method InternetMessageIO#through_message.
* lib/net/smtp.rb: ditto.
* lib/net/protocol.rb: rename InternetMessageIO#read_pendstr to read_message_to.
* lib/net/pop.rb: ditto.
* lib/net/protocol.rb: rename InternetMessageIO#read_pendlist to each_list_item
* lib/net/pop.rb: ditto.
* lib/net/protocol.rb: Now block size is 1024.
* lib/net/smtp.rb: new methods SMTP#esmtp? and #esmtp=.
* lib/net/http.rb: Using singleton method syntax instead of singleton class clause, to avoid behavior change of class variables in ruby 1.7.
* lib/net/http.rb: HTTPResponse class does not inherit from Net::Response.
* lib/net/http.rb: devide HTTP#connecting into {begin,end}_transport.
* lib/net/http.rb: unused class Accumulator removed.
* lib/net/http.rb: Net::HTTP reads response. not HTTPRequest.
* lib/net/http.rb: proxy related class-instance-variables are not initialized correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19 12:33:52 +00:00
aamine
ffc3c4b401
aamine
...
* lib/net/http.rb: HTTP.Proxy should use self for proxy-class's super class.
* lib/net/http.rb: initialize HTTP.proxy_port by HTTP.port.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-07 20:22:39 +00:00
aamine
f3d9a0cc21
aamine
...
* lib/net/protocol.rb: Protocol#start returns the return value of block.
* lib/net/protocol.rb: set timeout limit by default.
* lib/net/protocol.rb: new methods WriteAdapter#write, puts, print, printf.
* lib/net/http.rb: rename HTTP#get2 to request_get, post2 to request_post ...
* lib/net/smtp.rb: should not resolve HELO domain automatically.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-30 19:18:45 +00:00
aamine
39c0252e04
aamine
...
* lib/net/pop.rb: new method Net::POP3.APOP
* lib/net/http.rb: set default Content-Type to x-www-form-urlencoded (causes warning)
* lib/net/protocol.rb: remove Net::NetPrivate module.
* lib/net/smtp.rb: ditto.
* lib/net/pop.rb: ditto.
* lib/net/http.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-13 19:15:21 +00:00
aamine
fa6dc283cd
aamine
...
* lib/net/protocol.rb: calls on_connect before conn_command
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-09 08:58:30 +00:00
aamine
a20863ff41
aamine
...
* lib/net/smtp.rb: SMTP.new requires at least one arg.
* lib/net/pop.rb: POP.new requires at least one arg.
* lib/net/pop.rb: uses "raise *Error.new" instead of simple raise.
* lib/net/http.rb: HTTP.new requires at least one arg.
* lib/net/http.rb: changes implicit start algolithm.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-07 10:04:25 +00:00
aamine
772ed5507e
aamine
...
* lib/net/protocol.rb: Protocol.new requires at least one arg.
* lib/net/smtp.rb: ditto.
* lib/net/pop.rb: ditto.
* lib/net/http.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-17 03:08:45 +00:00
aamine
a2193f50e8
aamine
...
* lib/net/http.rb: HTTP#proxy? did not worked.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13 21:20:41 +00:00
aamine
2b67bb576a
aamine
...
* lib/net/http.rb: rename HTTP#request_by_name to send_request.
* lib/net/protocol.rb (ProtoSocket#read): modify typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-08 07:00:23 +00:00
aamine
afb3a0cff1
aamine
...
* lib/net/http.rb (HTTP#request_by_name): arg order changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 19:18:17 +00:00
aamine
9e79454b3d
aamine
...
* lib/net/http.rb (HTTP#request_by_name): bug fix.
* lib/net/http.rb: does not write Connection: by default.
* lib/net/protocol.rb: "start" for started protocol is an error.
* lib/net/protocol.rb: "finish" for finished protocol is an error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 19:03:16 +00:00
aamine
fa20d931bc
aamine
...
* lib/net/http.rb: new method HTTP#request_by_name (test)
* lib/net/http.rb: new class HTTPGenericRequest
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-03 18:13:13 +00:00
aamine
cf37626401
* protocol.rb,smtp.rb,pop.rb,http.rb: modify document.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-27 00:59:08 +00:00
aamine
c664027a34
aamine
...
* lib/net/pop.rb: new methods POP3.auth_only, POP3#auth_only
* lib/net/http.rb: HTTP.Proxy returns self if ADDRESS is nil.
* lib/net/protocol.rb: new method ProtocolError#response
* lib/net/protocol.rb,smtp.rb,pop.rb,http.rb: add document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-26 23:49:21 +00:00
aamine
1a7cb01d64
aamine
...
* lib/net/http.rb: add HTTPRequest#basic_auth.
* lib/net/smtp.rb: raise if only account or password is given.
* lib/net/protocol.rb: WriteAdapter#<< returns self.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-13 05:48:58 +00:00
aamine
4dae731bbd
aamine
...
* lib/net/protocol.rb: one write(2) per one line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-08 08:39:40 +00:00
aamine
b1cd5105d4
aamine
...
* lib/net/http.rb: always close connection on request without body.
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: change copyright.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-24 04:53:50 +00:00
aamine
acce0b7ec4
aamine
...
* lib/net/protocol.rb: clear read buffer after reopen.
* lib/net/protocol.rb: refactoring.
* lib/net/http.rb: split module HTTPHeader from HTTPResponse.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-22 23:23:57 +00:00
aamine
b2deafb277
aamine
...
* lib/net/http.rb: Response#range_length was not debugged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-17 20:40:50 +00:00
aamine
b576f57aa0
aamine
...
* lib/net/http.rb: join HTTPReadResponse into HTTPResponse again.
* lib/net/http.rb: move http_version() from HTTPRequest to HTTPResponse.
* lib/net/protocol.rb: refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-07 17:17:51 +00:00
aamine
7e5f9d5a13
aamine
...
* lib/net/http.rb: split HTTPResponse into HTTPReadResponse module.
* lib/net/protocol.rb: add Net::net_private.
* lib/net/protocol.rb: Socket#reopen takes arg, open_timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-07 07:23:09 +00:00
aamine
bf5ea58942
aamine
...
* lib/net/http.rb: Proxy did not work.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-06 13:04:08 +00:00
aamine
5113e8923c
aamine
...
* lib/net/http.rb: call on_connect() on re-opening socket.
* lib/net/pop.rb: also POP3 can use APOP auth.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-06 12:26:25 +00:00
aamine
cdc7602379
aamine
...
* lib/net/http.rb: add HTTP#request.
* lib/net/http.rb: take HTTP 1.0 server into account (incomplete).
* lib/net/protocol.rb: timeout for open/read.
* lib/net/protocol.rb: add Protocol#on_connect,on_disconnect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-06 11:14:51 +00:00
aamine
7adcec68b1
aamine
...
* lib/net/protocol.rb: ignore EOFError for read.
* lib/net/http.rb: user specified header was not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-16 07:57:43 +00:00
aamine
0c717d6a58
aamine
...
* lib/net/protocol.rb (adding): too few "yield" in case of arg is not String/File.
* lib/net/http.rb: add http request object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-13 19:07:15 +00:00
aamine
b40f3a89e3
aamine
...
* lib/net/protocol.rb,smtp.rb,pop.rb,http.rb: wrongly version 1.2 sources
were checked in.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-24 20:01:44 +00:00
aamine
c8da204306
aamine
...
* lib/net/http.rb: does not send HEAD on closing socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-24 19:39:15 +00:00
aamine
79633d3bb8
aamine
...
* lib/net/protocol.rb: set @closed false in Socket#reopen.
* lib/net/pop.rb: add POP3.foreach, delete_all.
* lib/net/pop.rb: add POP3#delete_all.
* lib/net/http.rb: add HTTP.version_1_1, version_1_2
* lib/net/http.rb: refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-22 18:40:55 +00:00
aamine
0d11c322d1
aamine
...
* lib/net/http.rb: can call {old,new}_implementation any times.
* lib/net/http.rb: HTTP#connecting, receive ->
common_oper, connecting.
* lib/net/http.rb: output warning if u_header includes
duplicated header.
* lib/net/http.rb: not check Connection:/Proxy-Connection;
always read until eof.
* lib/net/protocol: detects and catches "break" from block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-16 14:03:20 +00:00
aamine
f5ba5e64d5
aamine
...
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.31
* lib/net/http.rb: initializes header in HTTP, not HTTPCommand
* lib/net/protocol.rb, http.rb: rewrites proxy code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-10 23:31:32 +00:00
aamine
41e41d34d1
aamine
...
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.30
* lib/net/protocol.rb, smtp.rb: Command#critical_ok -> error_ok
* lib/net/http.rb: read header when also "100 Continue"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-07 11:27:16 +00:00
aamine
de75f3c0a6
aamine
...
* lib/net/http.rb: hex-alpha is not [a-h] but [a-f].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-15 21:37:30 +00:00
aamine
76819ef99a
aamine
...
* lib/net/pop.rb: POP3#reset
* lib/net/http.rb: a code for "Switch Protocol" was wrongly 100
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-12 09:54:32 +00:00
aamine
83033ce328
aamine
...
* lib/net/protocol.rb: 2nd arg for ProtocolError#initialize is optional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-11 05:27:56 +00:00
aamine
69543770ca
aamine
...
* lib/net/protocol.rb, http.rb: typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-23 18:00:28 +00:00
aamine
77f8b0db8d
aamine
...
* lib/net/http.rb: too early parameter expantion in string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-22 06:44:59 +00:00
aamine
616c1cd971
aamine
...
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.28.
* lib/net/http.rb: HTTPReadAdapter -> HTTPResponseReceiver
* lib/net/http.rb (connecting): response is got in receive()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-21 06:58:01 +00:00
matz
13243e5ad1
matz - net library bug (by me)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-21 06:37:24 +00:00
matz
fbcc6dea0c
matz: 1.6.0 final (hopufully)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-12 05:37:38 +00:00
aamine
79c2d60971
aamine
...
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.27.
* lib/net/protocol.rb: writing methods returns written byte size.
* lib/net/smtp.rb: send_mail accepts many destinations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-08-16 19:26:07 +00:00