aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server
AgeCommit message (Collapse)Author
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.
2015-11-11inets: Terminate gracfully when an invalid chunked length header is encounteredIngela Anderton Andin
Also use integer_to_list/2 and list_to_integer/2 instead of reimplementing it.
2015-10-05Merge branch 'ia/inets/string-not-atom/OTP-13022' into maint-18Erlang/OTP
* ia/inets/string-not-atom/OTP-13022: inets: Use ?MODULE_STRING instead of ?MODULE as argument should be a string
2015-10-01inets: Use ?MODULE_STRING instead of ?MODULE as argument should be a stringIngela Anderton Andin
2015-09-30inets: Add new customize function response_default_headersIngela Anderton Andin
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.
2015-09-30inets: Add behaviour httpd_custom_apiIngela Anderton Andin
Add this now as 18 allows optional callback specs
2015-09-10Merge branch 'ia/inets/format_status/OTP-12976' into maintIngela Anderton Andin
* ia/inets/format_status/OTP-12976: inets: httpd - Add format_status/2 to httpd_request_handler
2015-09-10inets: httpd - Mend broken fd optionIngela Anderton Andin
2015-09-03inets: httpd - Add format_status/2 to httpd_request_handlerIngela Anderton Andin
Avoid printing sensitive information in supervisor logs
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-16inets: Remove use of httpd_conf:clean/1 and httpd_conf:custom_clean/3Ingela Anderton Andin
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.
2015-06-15inets: Remove use of httpd_conf:make_integer/1Ingela Anderton Andin
2015-06-15inets: Deprecate functions in util module httpd_conf.erlIngela Anderton Andin
These functions should not be used, there exists better functions in the standard libraries.
2015-06-04inets: Modernize codeIngela Anderton Andin
* Remove debug macros that mimics call trace. * Remove comments that does not add value. * Structure code
2015-06-04inets: Add profile optionIngela Anderton Andin
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.
2015-06-02Merge branch 'maint'Henrik Nord
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