869 Commits

Author SHA1 Message Date
Nick Mathewson
fded0a8783 Fix compilation of recent error code with win32.
svn:r937
2008-09-05 16:47:04 +00:00
Nick Mathewson
de069b9977 On win32, errno is not the last socket error. Worse, WSAGetLastError() is not the last socket error sometimes (i.e., EWOULDBLOCK). Also, strerror() does not handle winsock errors. Therefore, event_err() and event_warn() are completely wrong for windows socket errors. Fix that.
svn:r936
2008-09-05 16:29:56 +00:00
Niels Provos
a710d817ad Match the query in DNS replies to the query in the request; from Vsevolod Stakhov
svn:r930
2008-08-30 23:19:49 +00:00
Niels Provos
c968eb3e01 Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me.
svn:r928
2008-08-19 11:26:47 +00:00
Niels Provos
b89a3de044 do not warn on accept when errno is egain|eintr
svn:r925
2008-07-25 05:22:28 +00:00
Niels Provos
cca2f8fa0e make event_add not change any state if it fails; repoted by Ian Bell
svn:r923
2008-07-25 01:29:54 +00:00
Niels Provos
1aa6826f62 fix off by one errors in devpoll; from Ian Bell
svn:r921
2008-07-25 01:18:40 +00:00
Niels Provos
3b24f4eedc another fix; we also need to remove the signal event from the queue
svn:r918
2008-07-25 00:48:30 +00:00
Niels Provos
e67a5ea9bb fix a problem with epoll and event_reinit; reported by Alexander Drozdov
svn:r917
2008-07-25 00:19:15 +00:00
Niels Provos
a4e2f52a44 add a signal and free the base for reinit test
svn:r915
2008-07-20 23:31:28 +00:00
Niels Provos
1c164cebb8 restore signal handlers correctly when we deallocate the signal base
svn:r913
2008-07-19 23:35:29 +00:00
Niels Provos
5e905c9dd5 if we change the timeouts on bufferevents, we might have to readd pending events
svn:r911
2008-07-17 14:09:07 +00:00
Niels Provos
12077b4e2e support setting of AA or RD in dns server response
svn:r910
2008-07-16 03:47:47 +00:00
Niels Provos
506f3d0c8d fix cname replies
svn:r907
2008-07-13 20:18:41 +00:00
Niels Provos
c4af6211bd forgot to add Alexander Drozdov as bug reporter in ChangeLog
svn:r905
2008-07-11 16:11:16 +00:00
Niels Provos
4bf44654a6 assert(a & b) -> assert(a && b)
svn:r903
2008-07-11 16:04:07 +00:00
Niels Provos
f7e61870e9 support multiple events listening on the same signal; make signals regular events that go on the same event queue
svn:r901
2008-07-11 15:49:04 +00:00
Niels Provos
5512be0176 fix a bug where deleting signals with kqueue would delete subsequent adds
svn:r899
2008-07-11 15:15:04 +00:00
Niels Provos
df97fca9ca From Scott Lamb:
* Allow the user to set the Content-Length: then stream a reply.
  This is useful for large requests of a known size. Added unit test.

* Don't send a response body on HEAD requests, 1xx status codes, 204
  status codes, or 304 status codes, as described in RFC 2616 section
  4.3. (Doing otherwise causes problems - in particular, if a 304 has a
  chunked body (even an empty one), Safari 3.1.1 issues and then fails
  the next request on the connection with the non-sequitur error message
  "Too many HTTP redirects"!)

* Specify a default Content-Type: when a response body is required, not
  when we have data in the response buffer by the time we make the
  header. (I.e., do this on evhttp_send_reply_start() for consistency.)

* Don't expect a body in response to HEAD requests.



svn:r898
2008-07-02 06:08:16 +00:00
Niels Provos
409236a77d detect CLOCK_MONOTONIC at runtime for evdns
svn:r896
2008-07-02 04:39:09 +00:00
Niels Provos
707f67849a reject negative content-length headers
svn:r894
2008-07-02 04:22:48 +00:00
Niels Provos
cb7c3bd671 support multi-line http headers; based on a patch from Moshe Litvin
svn:r890
2008-06-29 01:30:06 +00:00
Niels Provos
9998c0cbc8 correct handling of trailing headers in chunked replies; from Scott Lamb.
svn:r887
2008-06-26 00:40:57 +00:00
Niels Provos
21f76156b1 change min_heap_idx to signed
svn:r883
2008-06-25 16:32:47 +00:00
Niels Provos
52161b47b6 fix a bug in which nameservers would not be added to the correct base in windows.
svn:r873
2008-06-25 14:56:35 +00:00
Niels Provos
8aa94ced6d proper library dependencies for regress.
svn:r872
2008-06-25 01:01:11 +00:00
Niels Provos
637508144c add a visual studio 2005 solution
svn:r871
2008-06-25 01:00:29 +00:00
Niels Provos
9816192ac4 add log.h header file
svn:r870
2008-06-25 00:59:21 +00:00
Niels Provos
ac0c7e2c7d skip connection-retry test on windows
svn:r869
2008-06-25 00:58:08 +00:00
Niels Provos
0bee2ff383 void function should not return a value
svn:r868
2008-06-25 00:34:24 +00:00
Niels Provos
c3dc717a38 close fd if evhttp_get_requestion_connection fails
svn:r867
2008-06-24 23:37:37 +00:00
Niels Provos
24580e2b58 fix build on unix side
svn:r866
2008-06-24 22:43:19 +00:00
Niels Provos
60e4c0674a add an event_debug statement for executing active events.
svn:r865
2008-06-24 22:41:43 +00:00
Niels Provos
30abfd99a2 provide fake_getnameinfo so that the http layer works under windows.
svn:r864
2008-06-24 22:38:37 +00:00
Niels Provos
f80f90ed8b fix a bug in http_connect for windows; the address was not copied correctly.
svn:r863
2008-06-24 21:01:44 +00:00
Niels Provos
2f8708db3f ifdef out a whole bunch of sections; gettimeofday to evutil_gettimeofday
svn:r862
2008-06-24 18:04:41 +00:00
Niels Provos
994a7c50e1 close -> EVUTIL_CLOSESOCKET()
gettimeofday -> evutil_gettimeofday()

svn:r861
2008-06-24 16:39:45 +00:00
Niels Provos
55f914941d fix evutil_snprintf on windows
svn:r860
2008-06-24 16:29:02 +00:00
Niels Provos
35b1236c84 change write to send for windows.
svn:r859
2008-06-24 15:29:41 +00:00
Niels Provos
e736991aea make it work with older versions of automake; from Scott Lamb
svn:r858
2008-06-22 16:00:48 +00:00
Niels Provos
e711ce454a reintroduce a memmove when there is enough misalignment to hold the new data; otherwise the size of the buffer may grow without bounds
svn:r857
2008-06-21 06:10:10 +00:00
Niels Provos
99a1063e73 support 64-bit integers in rpc structs
svn:r856
2008-06-21 02:21:25 +00:00
Niels Provos
4c56ba1ced do not use SO_REUSEADDR when connecting
svn:r854
2008-06-20 06:52:13 +00:00
Niels Provos
774d056c46 warn on connection failures
svn:r853
2008-06-17 01:14:58 +00:00
Nick Mathewson
2baaac7fdb Forward-port: Rename INPUT and OUTPUT to EVRPC_INPUT and EVRPC_OUTPUT, but keep the INPUT/OUTPUT aliases on non-win32 platforms to maintain backwards compatibility.
svn:r852
2008-06-14 17:50:36 +00:00
Niels Provos
a6ce520cfb allow min_heap_erase to be called on removed members; from liusifan
svn:r849
2008-06-12 14:43:35 +00:00
Nick Mathewson
c584741baf Fix line ending style on windows projects files.
svn:r847
2008-06-02 18:35:02 +00:00
Niels Provos
344c2b56f1 deliver partial data to request callbacks when chunked callback is set even if there is no chunking on the http level; allows cancelation of requests from within the chunked callback; from Scott Lamb.
svn:r846
2008-06-02 05:45:26 +00:00
Niels Provos
9586a1cbb0 fix an evbuffer corruption when adding an empty evbuffer; from Scott Lamb
svn:r845
2008-06-01 16:21:24 +00:00
Niels Provos
480d8142b8 do not define a variable in a header file; it will lead to duplicate symbols when linking
svn:r844
2008-06-01 01:19:08 +00:00