mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
tests/http: more tests with specific clients
- Makefile support for building test specific clients in tests/http/clients - auto-make of clients when invoking pytest - added test_09_02 for server PUSH_PROMISEs using clients/h2-serverpush - added test_02_21 for lib based downloads and pausing/unpausing transfers curl url parser: - added internal method `curl_url_set_authority()` for setting the authority part of a url (used for PUSH_PROMISE) http2: - made logging of PUSH_PROMISE handling nicer Placing python test requirements in requirements.txt files - separate files to base test suite and http tests since use and module lists differ - using the files in the gh workflows websocket test cases, fixes for we and bufq - bufq: account for spare chunks in space calculation - bufq: reset chunks that are skipped empty - ws: correctly encode frames with 126 bytes payload - ws: update frame meta information on first call of collect callback that fills user buffer - test client ws-data: some test/reporting improvements Closes #11006
This commit is contained in:
parent
21575b26fe
commit
acd82c8bfd
32 changed files with 1678 additions and 102 deletions
|
|
@ -130,7 +130,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
|||
|
||||
#define OUTPUTFILE "dl"
|
||||
|
||||
static int setup(CURL *hnd)
|
||||
static int setup(CURL *hnd, const char *url)
|
||||
{
|
||||
FILE *out = fopen(OUTPUTFILE, "wb");
|
||||
if(!out)
|
||||
|
|
@ -141,7 +141,7 @@ static int setup(CURL *hnd)
|
|||
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
|
||||
|
||||
/* set the same URL */
|
||||
curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
|
||||
curl_easy_setopt(hnd, CURLOPT_URL, url);
|
||||
|
||||
/* please be verbose */
|
||||
curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
|
||||
|
|
@ -211,12 +211,16 @@ static int server_push_callback(CURL *parent,
|
|||
/*
|
||||
* Download a file over HTTP/2, take care of server push.
|
||||
*/
|
||||
int main(void)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
CURL *easy;
|
||||
CURLM *multi_handle;
|
||||
int transfers = 1; /* we start with one */
|
||||
struct CURLMsg *m;
|
||||
const char *url = "https://localhost:8443/index.html";
|
||||
|
||||
if(argc == 2)
|
||||
url = argv[1];
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
|
|
@ -224,7 +228,7 @@ int main(void)
|
|||
easy = curl_easy_init();
|
||||
|
||||
/* set options */
|
||||
if(setup(easy)) {
|
||||
if(setup(easy, url)) {
|
||||
fprintf(stderr, "failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue