aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client
AgeCommit message (Collapse)Author
2017-06-14Update copyright yearHans Nilsson
2017-05-30inets: httpc - Gracefull normal shutdownIngela Anderton Andin
2017-05-23Fix httpc timeout for redirectsJohannes Weißl
Probably since 6153ba7 (OTP R13B04) the httpc timeout setting does not work for redirects (when autoredirect is true). With this patch a new timer is started for the new (redirected) requests. This means that a simple redirected request could return after 2*timeout milliseconds. This is the first part to fix https://bugs.erlang.org/browse/ERL-420
2017-05-04Update copyright yearRaimo Niskanen
2017-04-04Merge branch 'maint'Ingela Anderton Andin
Conflicts: OTP_VERSION erts/vsn.mk lib/crypto/c_src/crypto.c lib/crypto/src/crypto.erl lib/ssh/src/ssh.erl
2017-03-17Omit port from Host header on redirect to well-known portBram Verburg
ERL-316, as part of 19.3, adds the port number to the Host header upon automatic redirection. The port number is included even if it is a well-known port (80, 443). This is different from the behaviour of most HTTP clients, as well as httpc's own for new requests. The added port number can lead to problems such as this one, where the request signature assumes the client will not send the :443 suffix on redirection to an https URL: https://github.com/nerves-project/nerves/issues/96 I was unable to add a test case, since that would require a server on a well-known port, but I manually verified that the GitHub/S3 signing issue was indeed resolved with this patch.
2017-03-01Fix typos: lenght -> lengthMyron Marston
2016-12-21inets: httpc - Prevent hanging user processIngela Anderton Andin
Input should be checked and httpc_handler process shall terminate gracefully on errors so that user process will in hang in gen_server:call.
2016-12-21inets: httpc - clean codeIngela Anderton Andin
Remove dead code and redundant debug macros. Better to use tracing for debugging.
2016-12-20inets: httpc - Chunk size decoding could failIngela Anderton Andin
Correct chunk decoding by adding missing argument to match. The symptom was that chunk decoding sometimes failed depending on stream data arrival timing.
2016-12-14inets: httpc - Correct redirection host headerIngela Anderton Andin
RFC2616 Sect 14.23: The Host request-header field specifies the Internet host AND port number.
2016-12-07Update copyright-yearErlang/OTP
2016-11-19Report errors from TLS tunnel request to correct processEric Meadows-Jönsson
2016-10-20inets: httpc - do not send absolute URIs over TLS tunnelsIngela Anderton Andin
Proxies want absolut URIs, but once a TLS tunnel is set up it is like talking direct to the server.
2016-10-07Merge branch 'ingela/inets/httpc/ERL-253' into maintIngela Anderton Andin
* ingela/inets/httpc/ERL-253: inets: httpc improve error handling
2016-10-04Replace ref() with reference() in inets filesKostis Sagonas
This supersedes PR #1185 (submitted by @KrzysiekJ) that changed all occurrences of ref() with reference() in inets files. However, there is little point in having these types only in comments. So, these types are now exposed as type declarations for the record fields they appear. While at it, uncommented more commented out type declarations and declared types for records defined in the affected modules and header files. Some type-unfriendly and obsolete code related to supporting code ungrades with a really old OTP release was also removed.
2016-09-19inets: httpc improve error handlingIngela Anderton Andin
Handler process should exit normal if manager process has been terminated
2016-09-18Update behavior of httpc:request to match RFC-7231Ahmed Shafeeq Bin Mohd Shariff
- The behavior of httpc:request when autoredirect = true is not correct according to the latest update in RFC-7231. This patch corrects the autoredirect behavior.
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-05Merge branch 'FabioBatSilva/httpc-delete-body/PR-972/OTP-13383'Lars Thorsen
* FabioBatSilva/httpc-delete-body/PR-972/OTP-13383: inets: Add DELETE Body to client remove whitespaces
2016-03-16inets: Mend ipv6_host_with_brackets optionIngela Anderton Andin
This is a quick fix to make this option work. We will revisit this and clean up httpc option handling later. Also adding regression tests.
2016-03-15update copyright-yearHenrik Nord
2016-02-22inets: Add DELETE Body to clientFabioBatSilva
2016-02-22remove whitespacesFabioBatSilva
2015-12-08inets: Add PATCH method to client and serverPablo Lamela
2015-11-27inets: SNI to be passed with requests through CONNECTKirilll Zaborsky
httpc should fill SNI extenstion for HTTPS requests sent through CONNECT tunnel to provide proper access to websites using SNI
2015-11-15inets: Terminate really gracefully on bad chunkJohannes Weißl
Without this fix, httpc:request/1 crashes the httpc_handler when an invalid chunked length header is encountered (since 77acb47): =ERROR REPORT==== 14-Nov-2015::17:19:30 === ** Generic server <0.651.0> terminating ** Last message in was {tcp,#Port<0.5714>, <<"HTTP/1.1 200 ok\r\nTransfer-Encoding:chunked\r\n\r\nåäö\r\n">>} ** When Server state == {state, [...] ** Reason for termination == ** {bad_return_value,{error,{chunk_size,"åäö"}}}
2015-10-27inets: fix {self, once} for not streamed requestKirilll Zaborsky
httpc should work properly if streaming option {self, once} is chosen and the corresponding response does not get streamed.
2015-10-27inets: send correct nonstreamed response with streamingKirilll Zaborsky
httpc_handler should respond with correct and complete responses seeing non-streamed status codes i.e. codes other than 200 or 206.
2015-09-15Merge branch 'ia/pr/800/OTP-12984' into maintIngela Anderton Andin
* ia/pr/800/OTP-12984: inets: Forward connection errors with https proxy
2015-09-09Correct conversion from seconds to millisecondsJimmy Zöger
2015-09-08inets: Forward connection errors with https proxyKirilll Zaborsky
httpc should return meaningful error reason disregarding whether it is being used with http proxy or not
2015-07-16inets: cancel for handler with no requestsKirilll Zaborsky
httpc_handler should react properly to cancel requests even when the request to be cancelled was already finished but httpc_manager did not get notified about that yet
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-16inets: Fix race condition in httpcIngela Anderton Andin
If the socket is closed by the peer do not try to close it again. Solves OTP-11845
2015-06-09inets: set proxy address for requests from keep-alive queueKirilll Zaborsky
httpc_handler should set correct address of the connected host and not ignore proxy option of the profile while sending requests taken out of keep-alive queue
2015-06-01inets: proper stop for httpc_handler K-A queue failureKirilll Zaborsky
httpc_handler should respond with proper {stop, Reason, State} message when sending request from keep-alive queue fails
2015-05-27Merge remote-tracking branch 'erlang/pr/741'Henrik Nord
* erlang/pr/741: Minor misprints
2015-05-26Minor misprintsKirill Zaborsky
2015-03-24inets: Add new module inets_time_compat with new time APIErland Schönbeck
The new module is backwards compatible.
2015-03-18Merge branch 'maint'Zandra Hird
2015-03-16Minor comment fixKirill Zaborsky
2015-02-05Merge branch 'maint'Zandra Hird
2015-02-03inets: parse correctly 'Set-Cookie' header with empty valueKirilll Zaborsky
httpc_cookie should parse cookies with empty values and no attributes set in the 'Set-Cookie' headers.
2015-01-26Merge branch 'maint'Marcus Arendt
2015-01-20httpc: Avoid parsing invalid 'Set-Cookie' headersSina Samavati
Parsing invalid 'Set-Cookie' header would make httpc crash. This commit filters invalid 'Set-Cookie' headers so that httpc wouldn't try to parse them.
2014-12-01inets: stop httpc_handler on 'connection closed' send errorKirilll Zaborsky
httpc_handler should be stopped when sending requests returns error because of a closed connection and `tcp_closed` message could not be catched (see http://erlang.org/pipermail/erlang-bugs/2007-May/000346.html ) otherwise it will lead to process leak.
2014-10-27Merge branch 'scrapinghub/update_session_original_stacktrace'Marcus Arendt
* scrapinghub/update_session_original_stacktrace: inets: Return correct stacktrace on session updating failure
2014-10-10inets: Return correct stacktrace on session updating failureKirilll Zaborsky
Debug output in httpc_handler:update_session/4 error handling code should not pollute stack trace returned in process exit.
2014-10-08Minor misprints correctionKirill Zaborsky