wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget2 | Added simulation of interrupting responses while sending res


From: Tim Rühsen
Subject: Re: wget2 | Added simulation of interrupting responses while sending response body in test server (!465)
Date: Wed, 29 Jan 2020 10:35:32 +0000


Merge request https://gitlab.com/gnuwget/wget2/-/merge_requests/465 was 
reviewed by Tim Rühsen

--
  
Tim Rühsen started a new discussion on tests/test-interrupt-response.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659819

> +{
> +
> +     const size_t DUMMYDATA_SIZE = 10240;

You won't need malloc here, just use `static uint8_t dummydata[10240]` and use 
sizeof() in memset(). Same for `dummydata_interrupted`.

--
  
Tim Rühsen started a new discussion on tests/test-interrupt-response.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659820

> +/*
> + * Copyright (c) 2017-2020 Free Software Foundation, Inc.

Change the year to 2020

--
  
Tim Rühsen started a new discussion on tests/test-interrupt-response.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659824

> + *
> + *
> + * Tests the --cut-get-vars setting.

Make a short description here.

--
  
Tim Rühsen started a new discussion on tests/test-interrupt-response.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659826

> +
> +#include <stdlib.h> // exit()
> +#include <string.h> // strlen()

maybe 'memset' instead of 'strlen' here

--
  
Tim Rühsen started a new discussion on tests/libtest.h: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659830

>               body_len; // The length of the body in bytes. 0 means use 
> strlen(body)
>  
> +  interrupt_response_mode_t interrupt_response_mode;

use tab indentation here

--
  
Tim Rühsen started a new discussion on tests/libtest.h: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659835

>  #define WGET_TEST_OCSP_RESP_FILE 3003
>  
> +typedef enum INTERRUPT_RESPONSE_MODE {

Remove `INTERRUPT_RESPONSE_MODE` (not needed).

--
  
Tim Rühsen started a new discussion on tests/libtest.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659837

> +             }
> +
> +             if (size_to_copy >= (param->interrupt_response_after_nbytes - 
> pos)) {

Did you mean `>` instead of `>=` ?

--
  
Tim Rühsen started a new discussion on tests/libtest.c: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465#note_278659839

> +             if (pos >= param->interrupt_response_after_nbytes) {
> +                     return (ssize_t) MHD_CONTENT_READER_END_WITH_ERROR;
> +

Remove empty line


-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/-/merge_requests/465
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]