aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2010-10-05httpc: allow streaming of PUT and POST request bodiesFilipe David Manana
This is a must when uploading large bodies that are to large to store in a string or binary. Besides a string or binary, a body can now be a function and an accumulator. Example: -module(httpc_post_stream_test). -compile(export_all). -define(LEN, 1024 * 1024). prepare_data() -> {ok, Fd} = file:open("test_data.dat", [binary, write]), ok = file:write(Fd, lists:duplicate(?LEN, "1")), ok = file:close(Fd). test() -> inets:start(), ok = prepare_data(), {ok, Fd1} = file:open("test_data.dat", [binary, read]), BodyFun = fun(Fd) -> case file:read(Fd, 512) of eof -> eof; {ok, Data} -> {ok, Data, Fd} end end, {ok, {{_,200,_}, _, _}} = httpc:request(post, {"http://localhost:8888", [{"content-length", integer_to_list(?LEN)}], "text/plain", {BodyFun, Fd1}}, [], []), ok = file:close(Fd1).
2010-09-24Remove stray use of _VOID_Björn Gustavsson
In a70159b33f20a26b2674d7cf777617c5f0261a5c, the _VOID_ macro was eliminated, but one use of it inside an "#ifdef DEBUG" was forgotten.
2010-09-24Fix crash in epp_dodger:tokens_to_string/1Maria Christakis
Add a function clause in the epp_dodger:tokens_to_string/1 to avoid a crash in case the argument is a character.
2010-09-21Merge branch 'maint-r13' into devBjörn Gustavsson
* maint-r13: Add test suites for (most) CORBA applications
2010-09-21Add test suites for (most) CORBA applicationsNiclas Eklund
2010-09-21Merge branch 'ia/ssl-asn1-spec-dss-params/OTP-7884' into devIngela Anderton Andin
* ia/ssl-asn1-spec-dss-params/OTP-7884: Handling of DSA key parameters
2010-09-21Merge branch 'maint-r13' into devLars Thorsen
2010-09-21Merge branch 'pl/observer-installation' into devBjörn Gustavsson
* pl/observer-installation: Fix installation of example file in lib/observer OTP-8857
2010-09-21Merge branch 'ta/eliminate-warnings' into devBjörn Gustavsson
* ta/eliminate-warnings: mnesia: Do not auto-import error/2 hipe: Do not auto-import min/2 and max/2 edoc: Do not auto-import error/1 OTP-8855
2010-09-21Correct leading whitespace in C port tutorialTuncer Ayaz
2010-09-21Merge branch 'vd/otpmbox_hash' into devBjörn Gustavsson
* vd/otpmbox_hash: add OtpMbox.hash() method OTP-8854
2010-09-21Handling of DSA key parametersIngela Anderton Andin
DSS-Params may be null in a certificate as it can inherit the parameters. Also ignore CA-certs that do not follow ASN-1 spec in RFC 5280.
2010-09-20add OtpMbox.hash() methodVlad Dumitrescu
The OtpMbox class was missing the hash() method while overriding equals(). This can cause problems when using jinterface in a larger Java application.
2010-09-20Prepare releaseErlang/OTP
2010-09-20Merge branch 'lars/xmerl/validation-of-empty-element/OTP-8599' of ↵Erlang/OTP
../lars_otp into maint-r13 * 'lars/xmerl/validation-of-empty-element/OTP-8599' of ../lars_otp: An empty element declared as simpleContent was not properly validated.
2010-09-20An empty element declared as simpleContent was not properly validated.Lars Thorsen
2010-09-17Merge branch 'ia/fix-dialyzer-specs' into devIngela Anderton Andin
* ia/fix-dialyzer-specs: Corrected and added dialyzer specs
2010-09-17Fix installation of example file in lib/observerPeter Lemenkov
Files (actually one file - multitrace.erl), marked as EXAMPLE_FILES are installed into $(RELSYSDIR)/src which is inconsistent with installation procedure for other example file in other modules. This file should be installed into $(RELSYSDIR)/examples directory. Signed-off-by: Peter Lemenkov <[email protected]>
2010-09-17Clarify documentation of shutdown timeout in supervisor child specsMagnus Henoch
Make it explicit that the shutdown timeout is to be specified in milliseconds.
2010-09-15mnesia: Do not auto-import error/2Tuncer Ayaz
Resolve name clash with auto-imported BIF error/2.
2010-09-15hipe: Do not auto-import min/2 and max/2Tuncer Ayaz
Resolve name clash with auto-imported BIFs min/2 and max/2.
2010-09-15edoc: Do not auto-import error/1Tuncer Ayaz
Resolve name clash with auto-imported BIF error/1.
2010-09-15Corrected and added dialyzer specsIngela Anderton Andin
2010-09-15Clean up bootstrap targets and documentationTuncer Ayaz
Remove cleartool invocation and adapt docs to reflect git transition.
2010-09-14Update version numbersBjörn Gustavsson
2010-09-13Prepare releaseOTP_R14BErlang/OTP
2010-09-13Merge branch 'egil/fix-ei-on-vxwork/OTP-8838' of ../egil_otp into devErlang/OTP
* 'egil/fix-ei-on-vxwork/OTP-8838' of ../egil_otp: Fix ei to build on vxworks
2010-09-13Merge branch 'bmk/inets/prepare_for_r14b' of ../bmk_otp into devErlang/OTP
* 'bmk/inets/prepare_for_r14b' of ../bmk_otp: Prepare release for inets-5.5 (R14B).
2010-09-13Merge branch 'bmk/snmp/prepare_for_r14b' of ../bjorn_otp into devErlang/OTP
* 'bmk/snmp/prepare_for_r14b' of ../bjorn_otp: Prepare for R14B
2010-09-13Merge branch 'bmk/megaco/prepare_for_r14b' of ../bjorn_otp into devErlang/OTP
* 'bmk/megaco/prepare_for_r14b' of ../bjorn_otp: Prepare release of megaco-3.15 (R14B)
2010-09-13Prepare release for inets-5.5 (R14B).Micael Karlberg
2010-09-13Prepare for R14BMicael Karlberg
2010-09-13Prepare release of megaco-3.15 (R14B)Micael Karlberg
2010-09-13Fix ei to build on vxworksBjörn-Egil Dahlberg
2010-09-13Merge branch 'pan/epmd-vulnerabilities/OTP-8780' into devPatrik Nyblom
* pan/epmd-vulnerabilities/OTP-8780: Teach testcases to survive TIME_WAIT overload Update erl_interface doc and testsuite for epmd changes Restore null termination of input buffer Teach testcase epmd_SUITE:too_large to accept econnaborted Teach epmd_cli.c to not respond 'Killed' when killing denied Calculate minimal packet size for ALIVE2 requests correctly Document epmd and it's options properly and fixup help text Fix anomalies in epmd not yet reported as security issues Remove two buffer overflow vulnerabilities in EPMD Remove all support for ancient EPMD protocol Remove very old protocol from EPMD Conflicts: lib/erl_interface/src/epmd/epmd_port.c
2010-09-13Merge branch 'sv/ei-writev' into devBjörn-Egil Dahlberg
* sv/ei-writev: fix incorrect writev iovec buffer handling in ei OTP-8837
2010-09-13Merge branch 'rickard/timer-wheel/OTP-8835' into devRickard Green
* rickard/timer-wheel/OTP-8835: Use mutex instead of rwlock
2010-09-13Merge branch 'pan/windows-testcases/OTP-8820' into devPatrik Nyblom
* pan/windows-testcases/OTP-8820: Teach Winsock initialization to be thread safe Make ei_threaded_send synchronized Increase timeout value in ei_accept_SUITE Teach ei_accept_SUITE to wait for node publish instead of using random sleeps Teach port suite to not use unix-specific commands and not leave them running Add line macros to gen_udp_SUITE:connect
2010-09-13Teach Winsock initialization to be thread safePatrik Nyblom
2010-09-13Make ei_threaded_send synchronizedPatrik Nyblom
2010-09-13Increase timeout value in ei_accept_SUITEPatrik Nyblom
2010-09-13Teach ei_accept_SUITE to wait for node publish instead of using random sleepsPatrik Nyblom
2010-09-13Teach port suite to not use unix-specific commands and not leave them runningPatrik Nyblom
2010-09-13Add line macros to gen_udp_SUITE:connectPatrik Nyblom
2010-09-13Merge branch 'egil/ei/fix-declspec/OTP-8826' into devBjörn-Egil Dahlberg
* egil/ei/fix-declspec/OTP-8826: Remove USE_DECLSPEC_THREAD from erl_interface
2010-09-13Merge branch 'ia/public_key-subject-alternative-name/OTP-8825' into devIngela Anderton Andin
* ia/public_key-subject-alternative-name/OTP-8825: Improved certificate extension handling Add handling of SubjectAltName of type otherName
2010-09-11fix incorrect writev iovec buffer handling in eiSteve Vinoski
For platforms that support writev, ei uses iovec structures to be able to easily send noncontiguous data buffers. When sending large messages, the socket can of course block, in which case ei adjusts its iovecs to pick up where it left off when the socket becomes writeable again. Unfortunately the code that handled the case when the number of bytes written are less than the current iovec size adjusted only the iovec byte count but not the iovec data pointer, resulting in the same data being sent multiple times. The fix is trivial: in addition to subtracting the count of bytes already written from the current iovec's size, also increment the current iovec's data pointer by the number of bytes already written. Tested manually on Linux and verified to fix a problem detected in production with writing large binaries from a cnode to a regular node. No unit tests were added, however, because they use the local loopback which acts more like a pipe than an inter-host TCP connection. The closing of the TCP window on the receiving side and the resultant write blocking on the socket, which in turn caused the code that mishandled the iovecs to be exercised, could unfortunately not be readily duplicated in the erl_interface test suite.
2010-09-10Merge branch 'pan/binary-bif-valgrind-leak/OTP-8823' into devPatrik Nyblom
* pan/binary-bif-valgrind-leak/OTP-8823: Teach erl_bif_binary not leak memory by doing malloc(0)
2010-09-10Update preloaded modulesPatrik Nyblom
2010-09-10Use mutex instead of rwlockRickard Green
Use mutex instead of rwlock since the read lock is more or less unused and it can be quite contended.