mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Merge HTTP request / response parsing code
This change also fixes a bug so that DNS lookups work correctly when the first answer is a CNAME record.
This commit is contained in:
parent
5a6c0f27c3
commit
a68cc690ff
20 changed files with 561 additions and 616 deletions
|
@ -24,11 +24,14 @@
|
|||
#include "net/http/escape.h"
|
||||
|
||||
TEST(VisualizeControlCodes, test) {
|
||||
size_t n;
|
||||
EXPECT_STREQ("hello", gc(VisualizeControlCodes("hello", -1, 0)));
|
||||
EXPECT_STREQ("hello\r\n", gc(VisualizeControlCodes("hello\r\n", -1, 0)));
|
||||
EXPECT_STREQ("hello␁␂␡", gc(VisualizeControlCodes("hello\1\2\177", -1, 0)));
|
||||
EXPECT_STREQ("hello\\u0085",
|
||||
gc(VisualizeControlCodes("hello\302\205", -1, 0)));
|
||||
EXPECT_STREQ("hi", gc(VisualizeControlCodes("hi", -1, &n)));
|
||||
EXPECT_EQ(2, n);
|
||||
}
|
||||
|
||||
TEST(VisualizeControlCodes, testOom_returnsNullAndSetsSizeToZero) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue