aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server
AgeCommit message (Collapse)Author
2018-08-22inets: Do not use chunked encoding with 1xx, 204, 304Péter Dimitrov
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
2018-08-14Merge branch 'ingela/inets/maint-20/status-501/ERIERL-218/OTP-15215' into ↵Erlang/OTP
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
2018-08-14inets: Use status code 501 when no mod_* handles the requestIngela Anderton Andin
Conflicts: lib/inets/test/httpd_SUITE.erl
2018-07-17inets: Improve error handlingIngela Anderton Andin
2018-05-22inets: Gracefully handle bad headersIngela Anderton Andin
max_headers operated on the individual header length instead of the total length of all headers. Also headers with empty keys are now discarded.
2017-11-10Merge branch 'maint-20' into maintIngela Anderton Andin
* maint-20: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Stop assuming that all schedulers are managed when updating msacc
2017-11-09inets: Add missing guardIngela Anderton Andin
Add test in the correct place which was the reason the guard became missing without being noticed.
2017-11-01inets: httpd - Fix broken handling of POST requestsIngela Anderton Andin
New chunk mechanism of body data in POST requests added in 5d01c70ca399edf28e99dc760506329689fab6ba broke handling of POST body data not using the new mechanism. Added better regression test
2017-11-01inets: Make sure httpd:stop_service is synchronousIngela Anderton Andin
2017-11-01inets: httpd - do not hardcode 302 status for locationIngela Anderton Andin
If a status code is provide by the ESI script that status code should have precedence over internal defaults. Also remove RFC 2616 requirement that URI must be absolute, that requirement is relaxed by RFC 7231.
2017-10-31inets: httpd - do not hardcode 302 status for locationIngela Anderton Andin
If a status code is provide by the ESI script that status code should have precedence over internal defaults. Also remove RFC 2616 requirement that URI must be absolute, that requirement is relaxed by RFC 7231.
2017-10-26Merge branch 'ingela/inets/not-chunked-esi/OTP-14656' into maintIngela Anderton Andin
* ingela/inets/not-chunked-esi/OTP-14656: inets: httpd - Fix broken handling of POST requests
2017-10-25inets: httpd - Fix broken handling of POST requestsIngela Anderton Andin
New chunk mechanism of body data in POST requests added in 5d01c70ca399edf28e99dc760506329689fab6ba broke handling of POST body data not using the new mechanism. Added better regression test
2017-10-24inets: Make sure httpd:stop_service is synchronousIngela Anderton Andin
2017-10-12inets: ENV should be a stringIngela Anderton Andin
This is tested by new erts check that will cause badarg when trying to execute scripts via mod_cgi
2017-09-13inets: httpd correct server_name environment valueIngela Anderton Andin
Add host_name to hold the resolved name incorrectly provided as server name before.
2017-09-13inets: httpd - Add chunk handling of client dataIngela Anderton Andin
If the client uses PUT or POST to send a HTTP body the server currently will gather the whole body in memory before passing it on to the mod-callback. For legacy reasons it also converts the binary body to a list, this is really bad for memory usage! Add new option max_client_body_chunk to enable chunked handling of content-length requests. Also make it possible for chunked-encoded data to be propagated in portions to the mod-callback. Conflicts: lib/inets/test/httpd_SUITE.erl
2017-08-11Merge pull request #1509 from vances/issue-erl-398Ingela Andin
HTTP server truncates existing logs OTP-14530
2017-07-10Don't truncate existing disk_logs.Vance Shipley
An existing internal format disk_log will be repaired if possible. If not possible a new log will be created. This is the behaviour described in the documentation and code comments.
2017-07-07Log actual http status code of response.Vance Shipley
The status code provided by other modules was being ignored and 200 (OK) was logged for all responses.
2017-06-14Update copyright yearHans Nilsson
2017-05-08Merge pull request #1428 from martincox/masterIngela Andin
Error when a non-DST time is passed to the httpd_util:rfc1123_date/1 function OTP-14394
2017-05-04Update copyright yearRaimo Niskanen
2017-04-05When a non-DST time is passed to the httpd_util:rfc1123_date/1 function, itMartin Cox
causes a case-clause error, as the calender:local_time_to_universal_time_dst/1 can return an empty list, which is not currently handled. When called with an invalid DST time: 1> httpd_util:rfc1123_date({{2017, 03, 26},{1, 0, 0}}). ** exception error: no case clause matching [] in function httpd_util:rfc1123_date/1 (httpd_util.erl, line 334) To alleviate this, simply add a clause to handle the empty list and return the original time in the expected rfc1123 format. This is the approach of other modules which make use of the calender:local_time_to_universal_time_dst/1 function. The formatted date is then returned without error: 2> httpd_util:rfc1123_date({{2017, 03, 26},{1, 0, 0}}). "Sun, 26 Mar 2017 01:00:00 GMT"
2017-01-30inets: httpd - shutdown gracefully on connection or TLS handshake errorsIngela Anderton Andin
2016-12-07Update copyright-yearErlang/OTP
2016-12-05inets: Add Profile argument missed by commit ↵Ingela Anderton Andin
fdfda2fab0921d409789174556582db28141448e
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-08-09Merge branch 'maint-19' into maintLukas Larsson
Conflicts: lib/ssl/src/ssl.appup.src
2016-08-08inets: Add mod_esi test for PUTRaimo Niskanen
2016-08-08inets: Unify mod_esi "PUT" callback inputRaimo Niskanen
Change it to { Input :: string() | undefined, Body :: string() }
2016-08-08inets: Add mod_esi support for PUT AND DELETEIngela Anderton Andin
2016-07-24Fix httpd_conf:validate_properties/1 for ipfamilyEdwin Fine
inets:start/2 fails when using the legacy option inet6fb4 with a configuration proplist. It is not translated to inet as documented. This breaks existing code that relies on the documented behavior. This commit fixes the issue by translating inet6fb4 everywhere it is encountered in httpd_conf:validate_properties/1. From inets documentation (http://erlang.org/doc/man/httpd.html): {ipfamily, inet | inet6} Default is inet, legacy option inet6fb4 no longer makes sense and will be translated to inet. Fixes ERL-200.
2016-06-14Merge branch 'maint'Henrik Nord
Conflicts: OTP_VERSION lib/inets/vsn.mk lib/ssl/test/ssl_basic_SUITE.erl lib/ssl/vsn.mk
2016-06-09inets: Handle multiple \t in mime types fileIngela Anderton Andin
2016-05-16inets: httpd_util:split does not return {error, Reason}Ingela Anderton Andin
Fix return value handling that was missed when code was refactored to use re-module.
2016-04-25inets: Add peer_cert to ESI environmentIngela Anderton Andin
2016-04-21inets: Add peer_cert to ESI environmentIngela Anderton Andin
2016-03-15update copyright-yearHenrik Nord
2016-03-01inets: No error reports for expected terminationIngela Anderton Andin
2016-02-02Merge branch 'palas/maint' into maintZandra
* palas/maint: inets: Add PATCH method to client and server OTP-13286
2016-01-29Merge branch 'ia/maint/inets/mod_alias/OTP-13248' into maint-18Erlang/OTP
* ia/maint/inets/mod_alias/OTP-13248: inets: Prepare for release inets: Traverse all aliases looking for the longest match inets: Use re instead of inets_regexp # Conflicts: # lib/inets/vsn.mk
2016-01-28inets: Traverse all aliases looking for the longest matchIngela Anderton Andin
Before the first matching alias was returned, but we want the longest one to be returned.
2016-01-28inets: Use re instead of inets_regexpIngela Anderton Andin
2015-12-15inets: Include behaviour modules in install targetIngela Anderton Andin
2015-12-15inets: Fix dialyzer warningIngela Anderton Andin
2015-12-08inets: Add PATCH method to client and serverPablo Lamela
2015-11-27inets: Add warning header in "chunk trailer" when mod_esi callback times out ↵Ingela Anderton Andin
or fails Also remove legacy debug macros and add help function httpd_util:error_log/2 to avoid code duplication.
2015-11-27inets: Remove exit that generates an incorrect internal server errorIngela Anderton Andin
2015-11-11inets: httpd - Add possibility to specify socket options for HTTPIngela Anderton Andin
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.