diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-11-08 17:12:53 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-11-08 17:12:53 -0600 |
| commit | 079fb995bbfbfeb6ed61584bbc565293e73a15da (patch) | |
| tree | a92d78e79b673e0c01bf2c31ff52dafabfa3e362 | |
| parent | 0aaebb261332aab6c6bffc191e290a59bb324f51 (diff) | |
| download | busybox-w32-packaging-079fb995bbfbfeb6ed61584bbc565293e73a15da.tar.gz busybox-w32-packaging-079fb995bbfbfeb6ed61584bbc565293e73a15da.tar.bz2 busybox-w32-packaging-079fb995bbfbfeb6ed61584bbc565293e73a15da.zip | |
more debugging
| -rw-r--r-- | libressl.patch | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/libressl.patch b/libressl.patch index 8f061e2..b359476 100644 --- a/libressl.patch +++ b/libressl.patch | |||
| @@ -135,7 +135,7 @@ index 9f1dd67ec..7e8da6df2 100644 | |||
| 135 | static void tls_xwrite(tls_state_t *tls, int len) | 135 | static void tls_xwrite(tls_state_t *tls, int len) |
| 136 | { | 136 | { |
| 137 | diff --git a/networking/wget.c b/networking/wget.c | 137 | diff --git a/networking/wget.c b/networking/wget.c |
| 138 | index 6a64836fb..a99bf8dcb 100644 | 138 | index 6a64836fb..39a69d0b7 100644 |
| 139 | --- a/networking/wget.c | 139 | --- a/networking/wget.c |
| 140 | +++ b/networking/wget.c | 140 | +++ b/networking/wget.c |
| 141 | @@ -169,7 +169,8 @@ | 141 | @@ -169,7 +169,8 @@ |
| @@ -345,15 +345,29 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 345 | fflush(sfp); | 345 | fflush(sfp); |
| 346 | 346 | ||
| 347 | /* Tried doing this unconditionally. | 347 | /* Tried doing this unconditionally. |
| 348 | @@ -1358,6 +1414,7 @@ static void download_one_url(const char *url) | 348 | @@ -1358,14 +1414,21 @@ static void download_one_url(const char *url) |
| 349 | * Retrieve HTTP response line and check for "200" status code. | 349 | * Retrieve HTTP response line and check for "200" status code. |
| 350 | */ | 350 | */ |
| 351 | read_response: | 351 | read_response: |
| 352 | + printf("wget download_one_url 27\n"); | 352 | + printf("wget download_one_url 27\n"); |
| 353 | fgets_trim_sanitize(sfp, " %s\n"); | 353 | fgets_trim_sanitize(sfp, " %s\n"); |
| 354 | + printf("wget download_one_url 27-1\n"); | ||
| 354 | 355 | ||
| 355 | str = G.wget_buf; | 356 | str = G.wget_buf; |
| 356 | @@ -1441,6 +1498,7 @@ However, in real world it was observed that some web servers | 357 | + printf("wget download_one_url 27-2\n"); |
| 358 | str = skip_non_whitespace(str); | ||
| 359 | + printf("wget download_one_url 27-3\n"); | ||
| 360 | str = skip_whitespace(str); | ||
| 361 | + printf("wget download_one_url 27-4\n"); | ||
| 362 | // FIXME: no error check | ||
| 363 | // xatou wouldn't work: "200 OK" | ||
| 364 | + printf("wget download_one_url 27-5\n"); | ||
| 365 | status = atoi(str); | ||
| 366 | + printf("wget download_one_url 27-6\n"); | ||
| 367 | switch (status) { | ||
| 368 | case 0: | ||
| 369 | case 100: | ||
| 370 | @@ -1441,6 +1504,7 @@ However, in real world it was observed that some web servers | ||
| 357 | /* | 371 | /* |
| 358 | * Retrieve HTTP headers. | 372 | * Retrieve HTTP headers. |
| 359 | */ | 373 | */ |
| @@ -361,7 +375,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 361 | while ((str = get_sanitized_hdr(sfp)) != NULL) { | 375 | while ((str = get_sanitized_hdr(sfp)) != NULL) { |
| 362 | static const char keywords[] ALIGN1 = | 376 | static const char keywords[] ALIGN1 = |
| 363 | "content-length\0""transfer-encoding\0""location\0"; | 377 | "content-length\0""transfer-encoding\0""location\0"; |
| 364 | @@ -1497,6 +1555,7 @@ However, in real world it was observed that some web servers | 378 | @@ -1497,6 +1561,7 @@ However, in real world it was observed that some web servers |
| 365 | goto establish_session; | 379 | goto establish_session; |
| 366 | } | 380 | } |
| 367 | } | 381 | } |
| @@ -369,7 +383,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 369 | // if (status >= 300) | 383 | // if (status >= 300) |
| 370 | // bb_error_msg_and_die("bad redirection (no Location: header from server)"); | 384 | // bb_error_msg_and_die("bad redirection (no Location: header from server)"); |
| 371 | 385 | ||
| 372 | @@ -1514,6 +1573,7 @@ However, in real world it was observed that some web servers | 386 | @@ -1514,6 +1579,7 @@ However, in real world it was observed that some web servers |
| 373 | 387 | ||
| 374 | free(lsa); | 388 | free(lsa); |
| 375 | 389 | ||
| @@ -377,7 +391,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 377 | if (!(option_mask32 & WGET_OPT_SPIDER)) { | 391 | if (!(option_mask32 & WGET_OPT_SPIDER)) { |
| 378 | if (G.output_fd < 0) | 392 | if (G.output_fd < 0) |
| 379 | G.output_fd = xopen(G.fname_out, G.o_flags); | 393 | G.output_fd = xopen(G.fname_out, G.o_flags); |
| 380 | @@ -1536,6 +1596,7 @@ However, in real world it was observed that some web servers | 394 | @@ -1536,6 +1602,7 @@ However, in real world it was observed that some web servers |
| 381 | /* ftpcmd("QUIT", NULL, sfp); - why bother? */ | 395 | /* ftpcmd("QUIT", NULL, sfp); - why bother? */ |
| 382 | } | 396 | } |
| 383 | #endif | 397 | #endif |
| @@ -385,7 +399,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 385 | fclose(sfp); | 399 | fclose(sfp); |
| 386 | 400 | ||
| 387 | free(server.allocated); | 401 | free(server.allocated); |
| 388 | @@ -1544,11 +1605,13 @@ However, in real world it was observed that some web servers | 402 | @@ -1544,11 +1611,13 @@ However, in real world it was observed that some web servers |
| 389 | free(target.user); | 403 | free(target.user); |
| 390 | free(fname_out_alloc); | 404 | free(fname_out_alloc); |
| 391 | free(redirected_path); | 405 | free(redirected_path); |
| @@ -399,7 +413,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 399 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS | 413 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS |
| 400 | static const char wget_longopts[] ALIGN1 = | 414 | static const char wget_longopts[] ALIGN1 = |
| 401 | /* name, has_arg, val */ | 415 | /* name, has_arg, val */ |
| 402 | @@ -1590,6 +1653,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 416 | @@ -1590,6 +1659,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
| 403 | #endif | 417 | #endif |
| 404 | 418 | ||
| 405 | INIT_G(); | 419 | INIT_G(); |
| @@ -407,7 +421,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 407 | 421 | ||
| 408 | #if ENABLE_FEATURE_WGET_TIMEOUT | 422 | #if ENABLE_FEATURE_WGET_TIMEOUT |
| 409 | G.timeout_seconds = 900; | 423 | G.timeout_seconds = 900; |
| 410 | @@ -1626,6 +1690,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 424 | @@ -1626,6 +1696,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
| 411 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) | 425 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) |
| 412 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file) | 426 | IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file) |
| 413 | ); | 427 | ); |
| @@ -416,7 +430,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 416 | #if 0 /* option bits debug */ | 430 | #if 0 /* option bits debug */ |
| 417 | if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM"); | 431 | if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM"); |
| 418 | if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething"); | 432 | if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething"); |
| 419 | @@ -1670,6 +1736,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 433 | @@ -1670,6 +1742,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
| 420 | } | 434 | } |
| 421 | #endif | 435 | #endif |
| 422 | 436 | ||
| @@ -424,7 +438,7 @@ index 6a64836fb..a99bf8dcb 100644 | |||
| 424 | G.output_fd = -1; | 438 | G.output_fd = -1; |
| 425 | G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL; | 439 | G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL; |
| 426 | if (G.fname_out) { /* -O FILE ? */ | 440 | if (G.fname_out) { /* -O FILE ? */ |
| 427 | @@ -1691,8 +1758,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") | 441 | @@ -1691,8 +1764,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") |
| 428 | } | 442 | } |
| 429 | } | 443 | } |
| 430 | 444 | ||
