Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HTTP/2] Enable curl tests #245

Open
c410-f3r opened this issue Oct 10, 2024 · 0 comments
Open

[HTTP/2] Enable curl tests #245

c410-f3r opened this issue Oct 10, 2024 · 0 comments
Labels
enhancement The current state be improved F-http2 Feature - Http/2

Comments

@c410-f3r
Copy link
Owner

c410-f3r commented Oct 10, 2024

The more tests, the better. curl has a nice suite so let's try make use of it without having to create a new backend.

It is already possible to simulate a curl binary in wtx-ui with the _curl feature, in other words, the basic infrastructure is already defined.

At the current time the curl.sh file is capable of executing ./runtests.pl but it seems that HTTP/1 is required.

$ .scripts/curl.sh

...
...
...

RUN: server/sws --pidfile "log/server/http_server.pid" --cmdfile "log/server.cmd" --logfile "log/http_server.log" --logdir "log" --portfile "log/server/http_server.port" --keepalive 30 --ipv4 --port 0 --srcdir "."
test 0001...[HTTP GET]

 1: protocol FAILED!
 There was no content at all in the file log/server.input.
 Server glitch? Total curl failure? Returned: 2

 - abort tests

Additionally, --disable-http breaks the build so I don't know the best way forward to only test HTTP/2.

./configure --disable-http --enable-debug --with-nghttp2 --without-ssl
cf-h2-proxy.c: In function 'tunnel_stream_init':
cf-h2-proxy.c:97:12: error: implicit declaration of function 'Curl_http_proxy_get_destination' [-Werror=implicit-function-declaration]
   97 |   result = Curl_http_proxy_get_destination(cf, &hostname, &port, &ipv6_ip);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf-h2-proxy.c:97:12: warning: nested extern declaration of 'Curl_http_proxy_get_destination' [-Wnested-externs]
cf-h2-proxy.c: In function 'submit_CONNECT':
cf-h2-proxy.c:958:12: error: implicit declaration of function 'Curl_http_proxy_create_CONNECT' [-Werror=implicit-function-declaration]
  958 |   result = Curl_http_proxy_create_CONNECT(&req, cf, data, 2);
@c410-f3r c410-f3r added enhancement The current state be improved F-http2 Feature - Http/2 labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The current state be improved F-http2 Feature - Http/2
Projects
None yet
Development

No branches or pull requests

1 participant