Age | Commit message (Collapse) | Author |
|
Update httpc_manager.erl to fix typo
|
|
* maint:
inets: Prepare for release
inets: Robust handling of 204, 304, 1xx responses
inets: Do not use chunked encoding with 1xx, 204, 304
Change-Id: Ia739a7b1a7f1482194def99d039b5a7c8133a6ca
|
|
* maint-20:
inets: Prepare for release
inets: Robust handling of 204, 304, 1xx responses
inets: Do not use chunked encoding with 1xx, 204, 304
Change-Id: Ia88eb1d217b46fb01b1d7544d9ef34788c87abbd
|
|
* peterdmv/inets/fix_http_client/OTP-15242:
inets: Prepare for release
inets: Robust handling of 204, 304, 1xx responses
Change-Id: I12dced982907c3462fefb8a4ffaae8b365821f97
|
|
All 1xx (informational), 204 (no content), and 304 (not modified)
responses MUST NOT include a message-body, and thus are always
terminated by the first empty line after the header fields.
This implies that chunked encoding MUST NOT be used for these
status codes.
This commit updates the client to gracefully handle responses from
faulty server implementations that can send chunked encoded 204,
304 or 1xx responses.
Change-Id: I2dd502e28b3c6e121640083118fa5c3e479f5194
|
|
* maint:
Updated OTP version
Prepare release
Updated the engine load functionality
inets: Prepare for release
inets: Use status code 501 when no mod_* handles the request
ssl: Prepare for release
ssl: Make sure that a correct cipher suite is selected
ssl: Make sure that a correct cipher suite is selected
|
|
* maint-21:
Updated OTP version
Prepare release
Updated the engine load functionality
inets: Prepare for release
inets: Use status code 501 when no mod_* handles the request
ssl: Prepare for release
ssl: Make sure that a correct cipher suite is selected
ssl: Make sure that a correct cipher suite is selected
|
|
All 1xx (informational), 204 (no content), and 304 (not modified)
responses MUST NOT include a message-body, and thus are always
terminated by the first empty line after the header fields.
This implies that chunked encoding MUST NOT be used for these
status codes.
Change-Id: If6778165c947e64bc20d1ecab7a669e0b096f1a9
|
|
|
|
Conflicts:
lib/inets/test/httpd_SUITE.erl
|
|
|
|
maint-20
* ingela/inets/maint-20/status-501/ERIERL-218/OTP-15215:
inets: Prepare for release
inets: Use status code 501 when no mod_* handles the request
# Conflicts:
# lib/inets/test/httpd_SUITE.erl
# lib/inets/vsn.mk
|
|
Conflicts:
lib/inets/test/httpd_SUITE.erl
|
|
|
|
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
|
|
|
|
* maint:
Fix typo in xmerl_scan:string/1
Updated OTP version
Prepare release
ssl: Engine key trumps certfile option
inets: Prepare for release
inets: Improve error handling
|
|
* maint-20:
Updated OTP version
Prepare release
ssl: Engine key trumps certfile option
inets: Prepare for release
inets: Improve error handling
|
|
|
|
* maint:
Don't modify URI, explicitly pass scheme to get_port
Update scheme on redirect URI and accumulator
Fix accidental Port assertion in resolve_authority
Add test case on relative redirects with ports
Do not assert that new URI port is same as old port
Add mixed test group, http -> https redirect test
Change-Id: I23b976dbc64e19787d6eca5757df50a1b7098857
|
|
|
|
This is necessary to prevent an error when calling get_port inside
resolve_authority
|
|
|
|
When handling 301 redirects from http -> https on Erlang 21.0.1, the
following error is encountered:
```
8> Options = [].
9> httpc:request(head, {"http://rhye.org", []}, Options, []).
{error,{shutdown,{{error,{badmatch,443}},
[{httpc_response,resolve_uri,7,
[{file,"/usr/local/lib/erlang/lib/inets-7.0/src/http_client/httpc_response.erl"},
{line,431}]},
{httpc_response,redirect,2,
[{file,"/usr/local/lib/erlang/lib/inets-7.0/src/http_client/httpc_response.erl"},
{line,396}]},
{httpc_handler,handle_response,1,
[{file,"httpc_handler.erl"},{line,1052}]},
{httpc_handler,handle_info,2,
[{file,"httpc_handler.erl"},{line,283}]},
{gen_server,try_dispatch,4,
[{file,"gen_server.erl"},{line,637}]},
{gen_server,handle_msg,6,
[{file,"gen_server.erl"},{line,711}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}}}
```
This seems to be caused by the following code in `resolve_uri`:
```
resolve_uri(Scheme, Host, Port, Path, Query, URI, Map0) ->
case maps:is_key(scheme, URI) of
true ->
Port = get_port(URI)
```
The value of `Port` passed in to `resolve_uri` here is 80, since the
original URL is http. However, since the redirected URL is https, the
`get_port` call returns 443, which is not equal to 80, and crashes.
Assigning to a new variable seems to fix redirects.
|
|
According to the code in httpc.erl, the pquery parameter in the
#request record should start with a question mark. However, when
a server returned a 403 response, the Location header was parsed
and the question mark was not added to the beginning of the query
string. This ultimately causes the redirect to fail, as instead of
redirecting to "/path?query", httpc redirected to "/pathquery".
|
|
|
|
|
|
|
|
See also https://bugs.erlang.org/browse/ERL-634.
The utility program `erl_call' in erl_interface used to call
lib:eval_str/1, which is no longer present in Erlang/OTP 21.0.
The lib module was eliminated in OTP-15072, see also
https://github.com/erlang/otp/pull/1786.
|
|
* maint:
Updated OTP version
Prepare release
inets: Gracefully handle bad headers
|
|
max_headers operated on the individual header length instead of
the total length of all headers. Also headers with empty keys are
now discarded.
|
|
|
|
Change-Id: Ia53fb6bbf0822608ce9f7afe9b905d3bb1ce0b11
|
|
This commit will make the close down sequence work as intended, and no
crash report will be generated. Alas such error corner cases are hard to
write automated test for.
|
|
* peterdmv/httpd_reload_config/ERL-578/OTP-15025:
inets: Fix httpd:reload_config/2
Change-Id: Ib02587ac75f7f9f4ce665c6ead54b5ab11560411
|
|
- Add proper handling of path() as the first argument to
httpd:reload_config/2.
Change-Id: Ia5779bdd55bff974e8eb0dd16ef26edf1f52fcff
|
|
- Add support for setting socket options per request.
- Add http_ipv6 test group.
Change-Id: Ia2aca37c0b5fe64a41995c79ae3399434b17ab8a
|
|
- Add function for converting relative paths to absolute
using the server_root property.
Change-Id: If9b521e4444a3382f7e5449b187c1c0ebbb3d0f3
|
|
* maint:
inets: Fix broken httpc options handling
Change-Id: I9e44f0e53237a390048cab3aaf52ea0e1a5358a2
|
|
* peterdmv/httpc_delete_requests/ERL-536/OTP-15006:
inets: Fix broken handling of header Content-Type
Change-Id: I8d6f23d830961f71a198377351f14b0e97dcd44b
|
|
- Add support for setting socket options per request.
- Add http_ipv6 test group.
Change-Id: Ia2aca37c0b5fe64a41995c79ae3399434b17ab8a
|
|
Teach httpc to honour server connection close
|
|
Addresses https://github.com/erlang/otp/pull/1752#discussion_r177970060
|
|
Strict REST APIs does not accept HTTP requests that have no body
but still include a 'Content-Type' header. RFC7231 does not
forbid this corner case but as it causes interoperatbility
problems in client software we opt to not send the 'Content-Type'
header when the body is not present.
Change-Id: I36c43225fd156fb1b651037fcbe69b448665ec23
|
|
|
|
Change-Id: I20d44e771577b19060fbba0b2e83f64909c60faa
|
|
- Create directory structure
- Move code, tests, documentation from inets
- Add inets_tftp_wrapper
- Add tftp app to run-dialyzer script
Change-Id: I6a142ae66cecb9a1821cbf9ea6a45f66a836763d
|
|
Change-Id: I38bbca9d3fb2d90869cfe468e444204514301c36
|
|
- Created initial directory structure for the FTP application.
- Updated inets Makefiles to not include FTP related modules.
- Remove ftp code from inets
- Implement backward compatibility layer for FTP
- Add inets_ftp_wrapper
- Fix failing TCs
Change-Id: I120ec5bdef0c3df4cee2d7880db2aec581505bc4
|
|
From https://tools.ietf.org/html/rfc7230#section-6.6
> A client that receives a "close" connection option MUST cease
sending requests on that connection and close the connection after
reading the response message containing the "close"; if additional
pipelined requests had been sent on the connection, the client
SHOULD NOT assume that they will be processed by the server.
Notes on tests:
* The new tests are added only in group sim_http and not sim_https
because the same test approach appears to be not valid because when
processing the first response the server already sent data (> 0) for
the TLS/SSL handshake;
* The order of tests is relevant as it appears some test cases leave
reusable sessions behind.
|