http.c


Log

Author Commit Date CI Message
Niels Provos e44ef375 2008-04-29T04:52:50 convert evhttp_connection to use bufferevents svn:r742
Niels Provos 72a3902e 2008-04-29T00:24:00 test some primitives from http.c svn:r739
Nick Mathewson 49868b61 2008-04-25T01:18:08 r15316@tombo: nickm | 2008-04-24 20:58:36 -0400 Rename internal memory management functions from event_malloc() etc to mm_malloc() etc. svn:r725
Nick Mathewson a55a67d5 2008-04-18T13:46:13 r15249@tombo: nickm | 2008-04-18 09:46:02 -0400 Avoid leaking a string in the unlikely OOM case from name_from_addr. spotted by niels. svn:r724
Nick Mathewson 8863ff76 2008-04-17T19:19:36 r15224@tombo: nickm | 2008-04-17 15:19:24 -0400 Oops. We need to make sure that strdup wasn't oom. svn:r718
Nick Mathewson ae09ac4a 2008-04-17T19:18:40 r15220@tombo: nickm | 2008-04-17 15:16:02 -0400 Use new includes in more files still svn:r717
Nick Mathewson fc41ffde 2008-04-17T15:50:28 r15214@tombo: nickm | 2008-04-17 11:47:10 -0400 Make name_from_addr() threadsafe in http.c svn:r713
Niels Provos 558de9b3 2008-03-02T21:18:33 Provide OpenSSL style support for multiple threads accessing the same event_base svn:r684
Nick Mathewson 593b5f99 2008-02-29T22:33:01 r18492@catbus: nickm | 2008-02-29 17:32:55 -0500 Add another missing _REENTRANT. svn:r681
Niels Provos 5c70ea4c 2008-02-28T02:47:43 improved code for evbuffer; avoids memcpy svn:r674
Nick Mathewson e7ad5493 2008-02-26T20:24:29 r14507@tombo: nickm | 2008-02-26 15:23:44 -0500 Patch from Tani Hosokawa: make some functions in http.c threadsafe. Also, note some functions in http.c that still are not threadsafe. svn:r671
Niels Provos 7470ce52 2008-02-26T03:49:00 increase listen queue for http sockets to 128 svn:r669
Niels Provos 960be588 2008-02-26T03:29:36 deal correctly with http/1.0 and keep-alive svn:r667
Niels Provos 0b114da2 2008-02-26T03:12:07 introduce evhttp_accept_socket() to accept from an already created socket svn:r666
Niels Provos b14cd655 2008-02-25T07:49:22 add support (without tests!) to PUT/DELETE requests; from Josh Rotenberg svn:r662
Nick Mathewson d47907a7 2008-02-16T20:50:02 r14213@tombo: nickm | 2008-02-16 15:48:07 -0500 Patch from Scott Lamb: make http content length into a 64-bit value. svn:r641
Nick Mathewson 677a9586 2008-02-16T16:56:34 r14205@tombo: nickm | 2008-02-16 11:55:57 -0500 Fix bug 1894184: add a CRLF after each chunk when sending chunked HTTP data. Original patch from propanbutan. svn:r637
Niels Provos 2fde2217 2008-02-09T16:03:01 address some compiler warnings in debug mode svn:r630
Niels Provos 955c6abf 2007-12-28T00:36:47 pausing an rpc via a hook needs to deal with the fact that http callbacks free the request after they return; provide a way for a callback to take ownership of the request structure; the user then needs to explicitly free it. svn:r620
Niels Provos fdafb66b 2007-12-19T06:33:05 removed linger from http server socket; reported by Ilya Martynov svn:r604
Nick Mathewson 77861fa7 2007-12-06T19:20:24 r16931@catbus: nickm | 2007-12-06 14:19:58 -0500 Fix warnings in debug messages svn:r577
Nick Mathewson 3206bbca 2007-12-06T18:12:56 r15171@tombo: nickm | 2007-12-06 12:47:47 -0500 Use GCC attributes (where available) to verify printf type-correctness. Fix some bugs this turned up. svn:r573
Nick Mathewson 5482192b 2007-12-06T04:36:18 r15166@tombo: nickm | 2007-12-05 23:35:10 -0500 Apply patch from bug 1841036: set the base of the correct event in evhttp_connection_start_detectclose() svn:r571
Niels Provos 74b3db50 2007-11-29T06:08:24 always generate Date and Content-Length headers for HTTP/1.1 svn:r564
Nick Mathewson a7a7a190 2007-11-26T19:25:09 r16735@catbus: nickm | 2007-11-26 14:24:58 -0500 Fix test for EVBUFFER_LENGTH in evhttp_make_header(). Since appending an empty buffer to another is a no-op, this is not really a bug-fix. svn:r554
Nick Mathewson ce4ee418 2007-11-26T19:18:49 r16733@catbus: nickm | 2007-11-26 14:18:25 -0500 Add an --enable-gcc-warnings option (lifted from Tor) to the configure script. When provided, and when we are using GCC, we enable a bunch of extra GCC warnings in the compiler. Also, make the code all build happily with these warnings. svn:r553
Nick Mathewson 1120f04f 2007-11-25T21:53:06 r16731@catbus: nickm | 2007-11-25 16:52:53 -0500 Replace all fds on non-unix-specific APIs with evutil_socket_t, which is int on unix and intptr_t on win32. svn:r552
Nick Mathewson 6773a597 2007-11-25T21:32:26 r14953@tombo: nickm | 2007-11-25 15:56:40 -0500 Replace evbuffer_readline with a more powerful evbuffer_readln that can handle more EOL styles, and that can give useful results when there are NUL characters inside the returned values. Includes regression tests. svn:r550
Nick Mathewson 7eb250e9 2007-11-25T17:14:19 r14939@tombo: nickm | 2007-11-25 11:59:26 -0500 New function event_set_mem_functions to replace internal calls to malloc, free, etc with a user-supplied functions. svn:r541
Nick Mathewson 4e1ec3e0 2007-11-07T21:01:26 Make all the C files in the libraries compile under MSVC 2005 Express. There are still a few warnings, and probably some subtle issues, but it's better than nothing. svn:r499
Nick Mathewson e72661d2 2007-11-07T07:33:31 r16509@catbus: nickm | 2007-11-07 02:08:32 -0500 Stop using C++ style comments. svn:r497
Nick Mathewson 1f50f412 2007-11-07T07:33:26 r16508@catbus: nickm | 2007-11-07 02:01:03 -0500 Note a dubious point in http.c svn:r496
Nick Mathewson 7feba570 2007-11-07T07:33:21 r16507@catbus: nickm | 2007-11-07 01:34:55 -0500 Never assign a string constant to a non-const char *. svn:r495
Nick Mathewson a3f122d6 2007-11-07T07:33:16 r16506@catbus: nickm | 2007-11-07 01:29:59 -0500 Make all rpc and http functions not prototyped in evrpc.h and evhttp.h into static functions. I believe that these functions were meant to be private, yes? svn:r494
Nick Mathewson f74e7258 2007-11-07T06:01:57 r16501@catbus: nickm | 2007-11-07 01:00:31 -0500 This is one of those patches which will either make matters far simpler after the bugs shake out, or will get reverted pretty quick once we realize that it is a stupid idea. We now post-process the config.h file into a new event-config.h file, whose macros are prefixed with _EVENT_ and which is thus safe for headers to include. Using this, we can define replacement timeval manipulation functions in evutil.h, and use them uniformly through our code. We can also detect which headers are needful in event.h, and include them as required. This is also the perfect time to remove the long-deprecated acconfig.h file, so that autoheader no longer warns. Should resolve the following issues: [ 1826530 ] Header files should have access to autoconf output. [ 1826545 ] acconfig.h is deprecated. [ 1826564 ] On some platforms, event.h can't be included alone. svn:r492
Niels Provos 2026b215 2007-11-03T23:53:49 remove last vestiges of RBTREE svn:r470
Nick Mathewson 49ede3be 2007-10-03T17:19:22 r15517@catbus: nickm | 2007-10-03 13:14:05 -0400 Correct the pointer manipulation in fake_getaddrinfo(), and do the right thing for fake_getaddrinfo(NULL,&ai). Based on a patch by Lubmir Marinov, hacked until the unit tests passed on Linux with #undef HAVE_GETADDRINFO. svn:r459
Nick Mathewson bc7b7c24 2007-10-03T04:14:54 Fix implementation of strsep. svn:r457
Nick Mathewson fe482977 2007-09-24T16:26:11 r15324@catbus: nickm | 2007-09-24 12:22:21 -0400 New evutil.h macros to manipulate winsock errors. Use them in http.c and in evutil_socketpair(). svn:r451
Nick Mathewson d85bce4e 2007-09-20T18:38:31 Remove gratuitous tor-isms in evutil_socketpair(); fix a windows warning in http.c. svn:r446
Nick Mathewson 8b256b8e 2007-09-20T18:26:51 r15218@catbus: nickm | 2007-09-20 14:14:05 -0400 More win32 fixes: Use evutil_make_socket_nonblocking and EVUTIL_CLOSESOCKET consistently throughout the code. svn:r443
Niels Provos b835ee08 2007-09-15T15:50:11 fix http.c to compile properly with USE_DEBUG; from Christopher Layne svn:r430
Niels Provos e2f56411 2007-09-09T02:33:10 Fix a memory leak in which failed HTTP connections whould not free the request object svn:r419
Niels Provos 98f9616b 2007-09-07T02:49:46 support setting local address on an evhttp_connection svn:r416
Nick Mathewson 23866b76 2007-09-07T01:18:53 Another tweak on the date patch: win32 has no gmtime_r, but its gmtime() function uses thread-local storage for safety. Backportable. svn:r414
Nick Mathewson 003698c0 2007-09-07T01:03:01 r14975@catbus: nickm | 2007-09-06 21:00:38 -0400 Oops; we were already including sys/time.h. Remove the redundant include. svn:r413
Nick Mathewson 8d5ef326 2007-09-07T01:02:56 r14974@catbus: nickm | 2007-09-06 20:59:14 -0400 Changes to http.c: Add a Date header on replies if there is none already set. Also, include time.h unconditionally to be sure that struct tm is declared: every platform has time.h; the conditional should have been for sys/time.h. svn:r412
Niels Provos ff9e1af6 2007-09-02T01:33:38 demote most warnings to debug messages; execute callback later to allow freeing of connection object svn:r407
Niels Provos 11a0a9e4 2007-08-25T18:47:22 allow \r or \n individually to separate HTTP headers instead of the standard "\r\n"; from Charles Kerr. svn:r406
Niels Provos 67947ce3 2007-08-19T02:41:23 provide evhttp_new and evhttp_bind_socket instead of evhttp_start; using evhttp_new, it is possible to associate an event_base with the http server so that multi-threaded applications can have their own http server per thread; add appropriate testing. svn:r397
Niels Provos cd6dd951 2007-08-06T21:00:49 add a proper test for filtering new lines in headers svn:r384
Niels Provos 073d3590 2007-08-06T20:53:33 fix an embarassing bug where strchr was used with a cstring instead of a char svn:r383
Niels Provos 8ea5ffef 2007-08-05T02:15:10 request dispatching fix from Elliot Foster svn:r382
Niels Provos b7ff0248 2007-07-31T00:32:00 fix memory leak; found by Elliot F svn:r378
Niels Provos 3ad6b47e 2007-07-30T22:41:00 make clock_monotonic work; do not use default timeout; from Scott Lamb, plus some fixes from me. svn:r371
Niels Provos d7918e79 2007-07-30T21:27:33 drop illegal header values svn:r370
Niels Provos f0ff792a 2007-06-30T18:58:34 fixes from Joerg Sonnenberger: http.c is a violation of the ctype(3) interface and an unused function. test/regress_http.c are incorrect format strings. test/regress.c uses raise(3) from signal.h. evdns.c: evdns_error_strings is unused. The GET* macros can eat the semicolon from the expression. pos is passed in as off_t, so just pass that down. When assigning negativ values to unsigned variables, an explicit cast is considered good style. svn:r367
Niels Provos aa5c8068 2007-06-16T03:23:15 make it compile on solaris; from Andrei Nigmatulin svn:r366
Niels Provos cf5c1fce 2007-06-08T16:06:23 made the wrong fd non-blocking in accept_socket; from szjwwu svn:r364
Niels Provos 0c280824 2007-05-23T05:20:59 support removing of http callbacks and removing of registered RPCs svn:r355
Niels Provos 5b5400f6 2007-05-12T06:23:52 permit connection free from callback; from Ben Rigas svn:r354
Niels Provos a968da74 2007-03-06T06:26:10 split finding of callbacks out of code svn:r350
Niels Provos b5d2f9a2 2007-03-01T06:25:18 rolling back r339: evconfig.h does not work svn:r341
Niels Provos 127c260b 2007-02-28T04:02:29 make evconfig.h available as installed header file; not really ideal but good enough for me; from Nick Mathewson svn:r339
Niels Provos 995a58a3 2007-02-27T08:16:50 missing return (-1) for failures on make_socket svn:r338
Niels Provos 4356b681 2007-02-20T03:35:31 remove redundant \n from event_warn svn:r336
Niels Provos 06d0f8c0 2007-02-16T08:48:55 O(n^2) is bad svn:r332
Niels Provos fe266238 2007-02-15T02:16:07 try to make it work with proxy-connections svn:r329
Niels Provos 58f42c79 2007-02-14T16:59:47 fix handling of chunked requests svn:r328
Niels Provos 8901c141 2007-02-14T06:10:32 make chunked requests work correctly; this is done by providing a separate callback for invidiual chunks. if this callback is not set, all the data is going to be delivered at the end. svn:r327
Niels Provos 36950cef 2007-02-13T06:25:16 close connections for http/1.0 unless there is keep-alive svn:r326
Niels Provos 19373b3d 2007-02-13T06:14:42 when parsing query parameters, we automatically unquote them svn:r325
Niels Provos 9a65d013 2007-02-11T07:58:39 set content length even if content-type is specified svn:r324
Niels Provos bfb9f44f 2007-02-09T07:49:55 make mingw happy; from Nick Mathewson svn:r322
Niels Provos 22e53c7a 2007-01-27T04:10:08 make it work on freebsd; from phil oleson svn:r314
Niels Provos d5d04949 2007-01-18T06:28:42 fix http server so it can accept on high ports; better warning messages for getnameinfo; from Philip Lewis svn:r310
Niels Provos ff122207 2007-01-10T02:42:29 make accept socket non-blocking; from dug song svn:r309
Niels Provos ba8289be 2007-01-04T18:05:17 from dug song: the original code failed in the case of a large single client request+body write - for instance, over loopback (with a larger MTU exceeding EVBUFFER_MAX_READ). svn:r307
Niels Provos 0db257b8 2007-01-03T07:11:17 rename strlcpy so that it does not conflict with other tests; from Nick Mathewson. svn:r306
Niels Provos 894b6365 2006-12-23T07:30:10 fix a bug in an assert; from Weston Andros Adamson svn:r305
Niels Provos 557e0f62 2006-12-18T15:26:19 http chunking support from dug song; some refactoring and extra error checking by me svn:r304
Niels Provos a91d2b2b 2006-12-12T03:51:30 do close-detection via a separate event svn:r301
Niels Provos 04bdb248 2006-12-09T05:14:37 detect if a client to a streaming reply hangs up; from dug song comments from me :-) svn:r300
Niels Provos de7db33a 2006-12-09T02:58:12 low-level interfaces for streaming; from dug song i applied some bug fixes and slight re-arranged the logic on when to call the close notification callback; i also don't like the streaming interface; i'd rather see it do the chunked response formatting explicitly. svn:r298
Niels Provos 852d05a3 2006-12-09T01:41:57 support retrying for connections; from dug song small tweaks from me. svn:r297
Niels Provos 2225eec2 2006-12-09T01:33:03 decode uri when sending a request; from dug song svn:r296
Niels Provos 78592370 2006-12-06T04:12:11 fix a bug where event_set was called on a pending event; don't read body for return codes that do not require a body; from dug song. svn:r294
Niels Provos c6e285d3 2006-12-06T03:38:41 allow gotsig to terminate active event loop; free http connection on failed incoming connections; bugs pointed out by Dug Song. svn:r293
Niels Provos ec067919 2006-12-02T21:28:39 fix cases where there is no content or transfer encoding was specified from Dug Song svn:r291
Niels Provos 942656bb 2006-11-23T06:32:20 persistent connections are somewhat complicated; detect on the client side if the server closes a persistent connection. previously, we would have failed the next request on that connection. provide test case. svn:r277
Niels Provos 2d028ef6 2006-11-22T06:54:28 fix a bug where rpc would not be scheduled when they were queued; test for it. allow a configurable timeout for connections and RPCs. svn:r274
Niels Provos ce436242 2006-11-22T05:03:02 an attempt at differentiated error handling for timeouts and eof. really this needs to be propagated all the way to the callback. svn:r273
Niels Provos 868f10e7 2006-11-22T01:21:10 mingw fixes from Nick svn:r271
Niels Provos 31ba30ab 2006-11-18T08:51:12 make regression test work for poll and select svn:r265
Niels Provos 1a64c982 2006-11-18T07:30:21 some compilers don't like C99 inline variable declaration svn:r264
Niels Provos 36212f9d 2006-11-18T03:05:26 make persistent connections work; needs more testing svn:r261
Niels Provos d2c27da1 2006-11-18T02:10:25 introduce is connection close svn:r260
Niels Provos a67d9cb1 2006-11-17T07:45:42 add "Connection: close" to the output headers of the HTTP server reply; we don't currently support persistent connections; although that's going to be easy to add. svn:r259
Niels Provos c4836d10 2006-11-17T06:06:17 make sure that the rpc callback receives an unmarshaled payload; make sure that the rpc reply contains a good rpc structure, too. svn:r258
Niels Provos 1caff9bc 2006-11-16T15:59:42 we indicate a failed request by removing the uri from the request object svn:r257