awscrt 0.38.2
HTTP Content-Length before chunkedHTTP chunked before Content-Length
SHA-256e758cee4e273b3f559677450df65f5c893efdb657fe7ac6b13c3e0960259a9c2
Evidence
2:10… ght Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6#include <aws/http/private/h1_decoder.h>
7
8#include <aws/common/array_list.h>
9#include <aws/io/logging.h>
10#include <aws/testing/aws_test_harness.h>
11
12#include <ctype.h>
13#include <stdio.h>
14
15static const struct aws_byte_cursor s_typical_request = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("GET / HTTP/1.1\r\n"
16 "Host: amazon.com\r\n"
17 "Accept-Language: fr\r\n"
18 …
20:33… sor s_typical_response = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("HTTP/1.1 200 OK\r\n"
21 "Server: some-server\r\n …
22:33… "Content-Length: 11\r\n"
23 "\r\n"
24 …
73:19… ta) {
74 request_data->method_enum = method_enum;
75
76 memcpy(request_data->buffer, method_str->ptr, method_str->len);
77 request_data->method_str = aws_byte_cursor_from_array(request_ …
694:59… gth:\r\n"),
695
696 /* Has both content-length and transfer-encoding */
697 AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("POST / HTTP/1.1\r\n"
698 "Content-Length: 0\r\n"
699 "Transfer-Encoding: chunked\r\n"),
700
701 /* Has both transfer-encoding and content-length (but with transfer-encoding first this time) */
702 AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("POST / HTTP/1.1\r\n"
703 "Transfer-Encoding: chunked\r\n"
704 "Content-Length: 0\r\n"),
705
706 /* Multiple content-length headers */
707 AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("POST / HTTP/1.1\r\n"
708 "Content-Length: 0\r\ …
Showing the top 5 files — 8 more files (94 regions) not shown.
No evidence locations were recorded for this file. Raw result