Commit graph

9 commits

Author SHA1 Message Date
Chinmay
38b1c93764 esp_http_server : Bugfix in parsing of empty header values
This MR is intended to fix incorrect parsing of HTTP requests when empty header values are present.

The issue is was due to asymmetric behavior of `http_parser` library, which in case of:

    non-empty header values : invokes callbacks with the pointer to the start of a value
    empty header values : invokes callbacks with pointer to the start of next header or section

Since HTTP server relies on this pointer (along with length of the value) to locate the end of a value, and replace the line terminators (CRLFs) with null characters, the second case needed to be handled correctly.

Closes IDFGH-1539

Closes https://github.com/espressif/esp-idf/issues/3803
2019-09-09 08:21:13 +00:00
Anurag Kar
b26f6662f1 http_server examples : Updated tests and examples to demonstrate usage of httpd_register_err_handler() and accommodate for changes in default error handler behavior 2019-02-25 09:13:39 +00:00
Anurag Kar
639502ed5d esp_http_server example tests : updated advanced_tests as per API changes 2018-11-19 04:00:21 +00:00
Anurag Kar
8340ed3ddb HTTP Server Examples : Include header esp_http_server.h 2018-10-24 17:32:43 +05:30
Anurag Kar
6a3fa5c180 HTTP Server Examples : Updated examples to manually return 408 and 500 errors 2018-10-17 17:36:50 +05:30
Anurag Kar
3ed5af18fd HTTP Server Example Tests : Fix various issues
* Fixed regex constraints for parsing IP and other parameters from monitor log.
* httplib connection timeouts set
* Redundent tests (commented out earlier) have been removed from advanced_tests. These tests are already run during unit testing.
2018-09-05 23:29:07 +05:30
Anurag Kar
e2b4ad8f6e Temporary : Disable leak tests 2018-08-30 03:01:59 +05:30
Anurag Kar
e2da1d9905 http_server : Fix and enable example tests
This introduces the following changes in the example test scripts :
* Dependency on python requests library removed in favor of httplib
* Bug fixed in the logic responsible for receiving and processing http chunked responses
* Default timeouts increased Note : Due to connectivity issues (between runner host and DUT) in the runner environment, some of the advanced_tests are being ignored. These tests are intended for verifying the expected limits of the http_server capabilities, and implement sending and receiving of large HTTP packets and malformed requests, running multiple parallel sessions, etc. It is advised that all these tests be run locally, when making changes or adding new features to this component.
2018-08-30 03:01:59 +05:30
Anurg Kar
656bef7bb7 Http Server : Add a simple light weight HTTP Server Component.
Also add examples, docs and test apps for the HTTP Server.
2018-07-20 15:49:17 +05:30