Commit Graph

3408 Commits

Author SHA1 Message Date
ebdcc545e7 Remove ngtcp2 logs 2024-02-16 16:52:30 +01:00
eef5c051df Fix segfault 2024-02-16 16:52:24 +01:00
8a06ab8b95 Makefile.am: Add header file ssl.h 2024-02-15 15:59:07 +01:00
0c66434683 Undo previous wrong refactoring 2024-02-15 15:59:07 +01:00
6e87fef7be Document --http3-only 2024-02-15 15:59:07 +01:00
93520dcc07 Fix spell 2024-02-15 15:59:07 +01:00
3b51828c25 Remove old examples 2024-02-15 15:59:07 +01:00
a61eab63c4 Fix compiler warnings & misspellings 2024-02-15 15:59:07 +01:00
11e5602804 Exclude QUIC files from normal build 2024-02-15 15:59:07 +01:00
15369680a8 Fix warnings 2024-02-15 15:59:07 +01:00
45f2f72711 Guard --http3-only flag 2024-02-15 15:59:07 +01:00
46a49efb72 Fix syntax errors 2024-02-15 15:59:07 +01:00
535886bb11 Add empty line 2024-02-15 15:59:07 +01:00
ac7dd2171a Remove unused header file 2024-02-15 15:59:07 +01:00
66b1e8e36b Remove unused header file 2024-02-15 15:59:07 +01:00
201935e023 Add new translatable files 2024-02-15 15:59:07 +01:00
5ebc663ba1 Add translated strings 2024-02-15 15:59:07 +01:00
321a7e4344 Add translated strings 2024-02-15 15:59:07 +01:00
189e634669 quic: increase flow control limits 2024-02-15 15:59:07 +01:00
f6fff3ad37 fix: read from uninitialized memory 2024-02-15 15:59:07 +01:00
62349cbead fix: Close stream instead of full connection
When we receive a fin flag on a stream, close that individual stream.

Only when the HTTP/3 control stream is closed should the connection be
closed.
2024-02-15 15:59:07 +01:00
0daae7cd68 Fix headers loop 2024-02-15 15:59:07 +01:00
f0c431cf1f queue: Make sure we don't enqueue null items 2024-02-15 15:59:07 +01:00
061aba1e1d Fix memory leaks
* libwget/ssl_quic_gnutls.c (wget_ssl_close_quic): new function:
   deinit gnutls_session_t object.
 * libwget/quic.c (quic_stream_mark_acked): free node after dequeue.
   (wget_quic_deinit): deinit gnutls_session_t object.
 * libwget/queue.c (wget_queue_free): remove unused function.
   (wget_queue_free_node): new function: remove a node and its inner
   contents.
   (wget_queue_dequeue_transmitted_node, wget_queue_dequeue_data_node):
   return outer node object, instead of inner data. This makes it easier
   to free the full node & its contents after inspection.
   (wget_queue_enqueue): fix: unnecessary allocation.
 * libwget/http3.c (wget_http3_send_request): fix: free vector after
   use.
   (wget_http3_get_response): free full node after use.
   (wget_http3_get_response_cb): new function.
 * libwget/bytes.c (wget_byte_new): free bytes struct on error.
 * include/wget/wget.h (wget_queue_free): remove unused function.
   (wget_queue_free_node): new function.
   (wget_queue_dequeue_transmitted_node): change return value.
   (wget_queue_dequeue_data_node): change return value.

In addition, create new function wget_queue_free_node.

Introduce a new function that will free the node and its contents all at once.
2024-02-15 15:59:07 +01:00
d850700417 Implement --http3-only
Let wget2 call http3_*-specific functions when passed --http3-only.
2024-02-15 15:59:07 +01:00
090c232f86 QUIC: GnuTLS: set ALPN always 2024-02-15 15:59:07 +01:00
c6ef03cde7 Add end_headers callback 2024-02-15 15:59:07 +01:00
75725c483e Read the HTTP/3 response in wget_http3_get_response
Instead of reading it in wget_http3_send_request, we'd rather do it in
wget_http3_get_response. We do this to fit into wget2's flow, where
wget_http_get_response_cb is called to retrieve the response.
2024-02-15 15:59:07 +01:00
d7a10a3179 Do not pass along "Host" header
Some QUIC servers don't like the old-style "Host" header, because in
HTTP/3 the target hostname should be provided in the :authority header.
2024-02-15 15:59:07 +01:00
8d6dffc9fd Parse HTTP3 headers in recv_header_cb using wget_http_parse_header_line() function [skip ci]
* Implemented http3_stream_context and passed it while sending the request.
2024-02-15 15:59:07 +01:00
f9f8c23031 Fix coding style & examples 2024-02-15 15:59:07 +01:00
63f6c12c4d Fix code guards: allow compiling without QUIC or HTTP/3 2024-02-15 15:59:07 +01:00
08753ec2d9 GnuTLS: Set proper defaults for ALPN 2024-02-15 15:59:07 +01:00
3cdb151e28 Make write_stream more flexible 2024-02-15 15:59:07 +01:00
da79d1debc Set fin flag on a per-stream basis 2024-02-15 15:59:07 +01:00
c08b972015 Coalesce small frames 2024-02-15 15:59:06 +01:00
521f154b27 Prepare to close when receiving fin flag on a stream 2024-02-15 15:59:06 +01:00
8d79995fb9 Remove unused wget_ssl_init_quic 2024-02-15 15:59:06 +01:00
08def86d36 Implement connection close 2024-02-15 15:59:06 +01:00
759efe3219 Take config struct definition away from individual implementations 2024-02-15 15:59:06 +01:00
121bd1a331 Fix coding style 2024-02-15 15:59:06 +01:00
6e3833787a * Added ssl_quic_gnutls.c in the makefile to revert unnecessary changes due to previous rebase [skip ci] 2024-02-15 15:59:06 +01:00
b7ace3ed5e * Documentation for functions added [skip ci] 2024-02-15 15:59:06 +01:00
9626ee4f24 * changes made to discard wget_http3_connection and use wget_http_connection for http3 [skip ci] 2024-02-15 15:59:06 +01:00
2f49af5573 * implemented wget_http3_close [skip ci]
* gaurded http3 functions to check availablility of nghttp3 library
* some functions renamed to keep only specific functions of http3 public
2024-02-15 15:59:06 +01:00
66efdc8994 * changes made as pers suggestions [skip ci]
* restored the original signature of wget_dns_resolve
* added a check in the wget_quic_connect and wget_tcp_connect to check for respective socketypes
2024-02-15 15:59:06 +01:00
750cabc57d * changes made as per suggestions [skip ci]
* wget_http3_get_response returns the data that the http3 client stream has read
* all fprintf converted into debug_printf and error_printf
* fixed issues mentioned in the thread
2024-02-15 15:59:06 +01:00
02a684c5a4 * changes made in the code as per suggestions [skip ci]
* used wget_http_request to create a http3 request
* wget_http3_get_response implemented to read the response
2024-02-15 15:59:06 +01:00
6d22eb5cc0 * read for http3 working
* callback functions for closing the HTTP/3 and QUIC streams to be implemented.
2024-02-15 15:59:06 +01:00
ee67cef768 * ISSUE 10-16 : changes made as per suggestions [skip ci]
* defined local and remote info_addr in wget_quic_st as local
* removed _set_async function call as it was redundant
* if wget_ssl_quic_open fails, closed the socket
* implemented log_printf using wget_debug_vprintf
* called wget_printf_exit if gnutls_rnd fails
* checked the input value of handshake_read()
2024-02-15 15:59:06 +01:00