zephyr/tests/iot/test_http_header
Flavio Santes a1dc687b5d iot/http: Add test-case for HTTP header fields
This commit adds the following routines:

- test_invalid_header_content
- test_invalid_header_content
- test_invalid_header_field
- test_invalid_header_field
- test_preserve_data
- test_parse_url
- test_method_str
- test_header_nread_value
- test_double_content_length_error
- test_chunked_content_length_error
- test_header_cr_no_lf_error
- test_invalid_header_field_token_error
- test_invalid_header_field_content_error
- test_double_content_length_error
- test_chunked_content_length_error
- test_header_cr_no_lf_error
- test_invalid_header_field_token_error
- test_invalid_header_field_content_error

Origin:
https://github.com/nodejs/http-parser/releases/tag/v2.7.1
https://github.com/nodejs/http-parser/archive/v2.7.1.tar.gz

This patch reformats some http_parser files to reduce checkpatch
warnings.

See:
	https://gitlab.com/santes/http_parser/tree/refactoring1
Commit:
	c58dd8350fdf6ead0807ba37107b19f58e4f434c

Furthermore, method_str overflow test was updated to avoid compiler
warnings on some platforms.

Before:
	Line 627: http_method_str(1337)
After:
	Line 627: http_method_str(127)

Jira: ZEP-346
Jira: ZEP-776

Change-Id: If6163f59de21186f22f4f02d8c44f43ddbf9b59b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2016-12-02 12:41:20 +02:00
..
src
Makefile
README
prj.conf
testcase.ini

README

HTTP header fields test
-----------------------

Sample output:

tc_start() - HTTP header fields test
[PASS] test_preserve_data
[PASS] test_parse_url
[PASS] test_method_str
[PASS] test_header_nread_value
[PASS] test_double_content_length_error HTTP_REQUEST
[PASS] test_chunked_content_length_error HTTP_REQUEST
[PASS] test_header_cr_no_lf_error HTTP_REQUEST
[PASS] test_invalid_header_field_token_error HTTP_REQUEST
[PASS] test_invalid_header_field_content_error HTTP_REQUEST
[PASS] test_double_content_length_error HTTP_RESPONSE
[PASS] test_chunked_content_length_error HTTP_RESPONSE
[PASS] test_header_cr_no_lf_error HTTP_RESPONSE
[PASS] test_invalid_header_field_token_error HTTP_RESPONSE
[PASS] test_invalid_header_field_content_error HTTP_RESPONSE

	No errors detected
===================================================================
PASS - main.
===================================================================
PROJECT EXECUTION SUCCESSFUL