aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc_handler.erl
AgeCommit message (Collapse)Author
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-07Update copyright-yearErlang/OTP
2016-11-19Report errors from TLS tunnel request to correct processEric Meadows-Jönsson
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
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-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.
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
2014-07-03Fix typo in documentation /header_as_is/headers_as_is/Louis-Philippe Gauthier
2014-06-04Merge branch 'scrapinghub/stream_body_with_no_content_length' into maintMarcus Arendt
* scrapinghub/stream_body_with_no_content_length: inets: Fix HTTP 1.0 body end on closed connection
2014-05-22Merge branch 'scrapinghub/stream_for_chunked_single_message' into maintMarcus Arendt
* scrapinghub/stream_for_chunked_single_message: inets: Fix streaming with single chunk body
2014-05-16inets: Fix HTTP 1.0 body end on closed connectionKirilll Zaborsky
Receiving HTTP response with no Content-length header and with body ending on closed connection should give the complete response body contents up to the last byte received.
2014-04-30inets: Fix streaming with single chunk bodySergey Sinkovskiy
Receiving HTTP response with chunked transfer encoding in a single TCP message should produce stream messages for response body when streaming mode is used for httpc.
2014-03-21Merge branch 'nox/httpc-transfer-encoding-identity'Henrik Nord
* nox/httpc-transfer-encoding-identity: Support identity transfer-encoding in httpc OTP-11802
2014-03-21Merge branch 'ia/inets/revert/OTP-11756'Ingela Anderton Andin
* ia/inets/revert/OTP-11756: inets: Continue CTify test suite inets: Enable https tests inets: Make test suites independent of each other inets: Reverted commmit f97cd6965ac35d1cbe510de23592956857d144c8
2014-03-19Merge branch 'scrapinghub/update_session_error_logging_fix'Henrik Nord
* scrapinghub/update_session_error_logging_fix: inets: Fix incorrect argument order OTP-11794
2014-03-18inets: Reverted commmit f97cd6965ac35d1cbe510de23592956857d144c8Ingela Anderton Andin
The reverted commit took a too optimistic approch to pipeling. When added we thought it would be an improvment, but it proved to be a misconception.
2014-03-09Support identity transfer-encoding in httpcAnthony Ramine
> The default (identity) encoding; the use of no transformation whatsoever. > The Internet Assigned Numbers Authority (IANA) acts as a registry for > transfer-coding value tokens. Initially, the registry contains the > following tokens: "chunked" (section 3.6.1), "identity" (section 3.6.2), > "gzip" (section 3.5), "compress" (section 3.5), and "deflate" (section 3.5). Reported-by: Andrew Houghton
2014-03-09inets: Fix incorrect argument orderKirilll Zaborsky
Wrong order of arguments in httpc_handler:update_session/4 error handling code should not result in bad_argument error making stack trace unusable.
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been deprecated. They will be removed in OTP 18.0. Instead the types array:array(), dict:dict(), digraph:graph(), gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid() can be used. (Note: it has always been necessary to use ets:tid().) It is allowed in OTP 17.0 to locally re-define the types array(), dict(), and so on. New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2, queue:queue/1, and sets:set/1 have been added.
2013-09-13inets: httpc make httpc_cancel_request/[1,2] asynchronousIngela Anderton Andin
2013-09-13httpc: Enhanched error handlingIngela Anderton Andin
2013-09-13inets: httpc improve pipeliningIngela Anderton Andin
2013-05-20Remove http_chunk:decode/4 as it is no longer usedMasatake Daimon
http_chunk:decode/4, the side-effecting chunk decoder, was only used by httpc_handler:handle_http_body/2 but now it's completely unused.
2013-05-20Fix {stream, {self, once}} in httpcMasatake Daimon
Previously the only difference between {stream, self} and {stream, {self, once}} was an extra Pid in the stream_start message due to a bug in httpc_handler. It was immediately sending a bunch of messages till the end instead of waiting for httpc:stream_next/1 being called.
2013-03-18inets httpc: Revert incorrect commit regarding cookie handling.Ingela Anderton Andin
2013-02-18inets: Improve ssl handlingIngela Anderton Andin
httpc: CTfy test suite httpd: Simplify ssl configuration OTP-10846
2013-02-14inets httpc: Corrected separation of pipelining and persisten connectionsIngela Anderton Andin
OTP-10845
2012-10-02inets: Dialyzer fixesIngela Anderton Andin
2012-10-02inets httpc: TLS via proxyIngela Anderton Andin
Introduces new option htts_proxy so that it is possible to have different proxies for http and https. The new option defaults to the old proxy option. Implements HTTP-1.1 extension method CONNECT to establish SSL/TLS tunnel We choose not to implement "TLS upgrade" as defined by RFC 2817 as this method of upgrade is vulnerable to man in the middle attacks, can be easily broken by proxies and does not seem to be widely adopted.
2012-08-29Merge branch 'ta/docsmaint' into maintHenrik Nord
* ta/docsmaint: Fix various doc typos for R15B02 Fix various code typos for R15B02 OTP-10245
2012-07-05Fix various code typos for R15B02Tuncer Ayaz
2012-05-22[inets/httpc] Better handling of session db update failureMicael Karlberg
A failure to update the session database will now result in an informative error message and a controlled (handler) exit rather then an ugly crash. Also debug functions to retrieve sessions info and updated the info function with more info (sessions and options). OTP-10093