Age | Commit message (Collapse) | Author |
|
|
|
or fails
Also remove legacy debug macros and add help function httpd_util:error_log/2
to avoid code duplication.
|
|
|
|
|
|
* weisslj/fix-inets-crash-on-invalid-chunk-size:
inets: Terminate really gracefully on bad chunk
OTP-13117
|
|
|
|
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,"åäö"}}}
|
|
Before 77acb47 http:request/1 could parse server responses with
whitespace after the HTTP chunk size (some embedded legacy devices still
do this).
This patch restores this functionality.
|
|
Conflicts:
OTP_VERSION
|
|
|
|
|
|
ssl:start/[1,2] is a shell convenience function and should not be called
by other applications.
inet_db:start is an internal function that we should not have to call.
This was done for legacy reasons and is no longer needed.
|
|
Remove point less instructions looking for return values, that
in most cases no long exist, of which the result would anyhow be ignored
|
|
Was already possible for HTTPS. Also remove use of legacy option
inet6fb4. IPv6 standard moved away from beeing able to fallback to IPv4
so this option makes little sense, will use inet (Ipv4) as default instead of
inet6fb4.
|
|
|
|
The chunked length header should be checked as well as
headers present in the chunk trailer part, ignored extensions are counted
as header bytes. Also the decode trailer function will stop as soon
as the header size is exceed, when that happens.
|
|
Also use integer_to_list/2 and list_to_integer/2 instead of reimplementing it.
|
|
httpc should work properly if streaming option {self, once} is
chosen and the corresponding response does not get streamed.
|
|
httpc_handler should respond with correct and complete
responses seeing non-streamed status codes i.e. codes
other than 200 or 206.
|
|
|
|
* scrapinghub/http_uri_scheme_validation:
inets: scheme validation fun for http_uri
OTP-13071
|
|
http_uri:parse_scheme function should allow checking
scheme of URIs otherwise it could be easily abused to
reach limit number of atoms in the VM
|
|
httpc should not fail when response contains (now deprecated)
multiline HTTP headers constructed with obs-folds. And as
RFC7230 specifies user agent should replace obs-folds with
spaces.
|
|
A record field type has been modified due to commit 8ce35b2:
"Take out automatic insertion of 'undefined' from typed record fields".
|
|
* ia/inets/string-not-atom/OTP-13022:
inets: Use ?MODULE_STRING instead of ?MODULE as argument should be a string
|
|
|
|
This enables the user to provide default HTTP header values for headers
that should always be sent. Note that these values
may override built in defaults.
|
|
Add this now as 18 allows optional callback specs
|
|
|
|
* ia/pr/800/OTP-12984:
inets: Forward connection errors with https proxy
|
|
* ia/inets/format_status/OTP-12976:
inets: httpd - Add format_status/2 to httpd_request_handler
|
|
* ia/pr/813/OTP-12975:
Correct conversion from seconds to milliseconds
|
|
|
|
|
|
|
|
httpc should return meaningful error reason disregarding whether
it is being used with http proxy or not
|
|
Avoid printing sensitive information in supervisor logs
|
|
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
|
|
|
|
If the socket is closed by the peer do not try to close it again.
Solves OTP-11845
|
|
Internal use of the function white_space_clean/1 could probably be done
in a much better way using re-module and removing a lot of legacy code.
But we will have to do this later, due to lack of time, we want to make
this commit as little work as possible.
|
|
|
|
These functions should not be used, there exists better
functions in the standard libraries.
|
|
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
|
|
* ia/inets/name-spaces/OTP-12674:
inets: Modernize code
inets: Add profile option
|
|
* scrapinghub/proper_stop_on_handling_keepalive_queue:
inets: proper stop for httpc_handler K-A queue failure
OTP-12803
|
|
* Remove debug macros that mimics call trace.
* Remove comments that does not add value.
* Structure code
|
|
To enable the HTTP server to run in a virtualized environment,
where there can be more that one server that has the same
bind_address and port, we add a new option profile.
The profile name will be used in concatenation with bind_address and port
to identify the HTTP server instance.
The name profile was chosen as there is a similar concept in the HTTP client
where profile names can be used to instantiate client configurations.
|
|
Conflicts:
OTP_VERSION
lib/inets/test/httpd_SUITE.erl
lib/inets/vsn.mk
lib/ssh/src/ssh.erl
lib/ssh/vsn.mk
lib/ssl/src/ssl.appup.src
lib/ssl/vsn.mk
|
|
httpc_handler should respond with proper {stop, Reason, State}
message when sending request from keep-alive queue fails
|