Commit Graph

3382 Commits

Author SHA1 Message Date
7939610dcc Fix headers loop 2024-01-11 20:42:21 +01:00
8deeba0a26 queue: Make sure we don't enqueue null items 2024-01-07 21:10:16 +01:00
1682a2065b Remove unused function 2024-01-07 21:02:09 +01:00
cbce6da768 New function wget_queue_free_node
Introduce a new function that will free the node and its contents all at once.
2024-01-07 20:51:54 +01:00
ce56123705 Fix memory leak
Copying the whole thing is unnecessary, and introduced a memory leak.
2024-01-07 20:41:41 +01:00
913a1a99d2 Fix memory leaks
Fix memory leaks
2024-01-07 20:19:12 +01:00
c8bf9a7112 Fix memleaks 2024-01-03 21:39:10 +01:00
b6cb86f859 Implement --http3-only 2023-12-26 20:20:07 +01:00
0f7ead6187 tmp: Call HTTP/3 functions from wget2 2023-12-26 18:50:32 +01:00
4d44702714 Add end_headers callback 2023-12-26 17:13:29 +01:00
ab88d5e9ec 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.
2023-12-17 20:58:10 +01:00
874ef44abf 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.
2023-12-17 20:58:10 +01:00
97bbcc4d41 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.
2023-12-17 20:58:10 +01:00
d73d59abc4 Fix coding style & examples 2023-12-17 20:58:10 +01:00
ad79ff70e2 Fix code guards: allow compiling without QUIC or HTTP/3 2023-12-17 20:58:10 +01:00
5578e6cf40 GnuTLS: Set proper defaults for ALPN 2023-12-17 20:58:10 +01:00
f56a390edc Make write_stream more flexible 2023-12-17 20:58:10 +01:00
54a9bc5722 Set fin flag on a per-stream basis 2023-12-17 20:58:10 +01:00
aa716b8b8a Coalesce small frames 2023-12-17 20:58:10 +01:00
3fe9709682 Prepare to close when receiving fin flag on a stream 2023-12-17 20:58:10 +01:00
162d4c2966 Remove unused wget_ssl_init_quic 2023-12-17 20:58:10 +01:00
91a39e1a2b Implement connection close 2023-12-17 20:58:10 +01:00
f23ca80b7b Take config struct definition away from individual implementations 2023-12-17 20:58:10 +01:00
9b803acdbf Fix coding style 2023-12-17 20:58:10 +01:00
5e21ba09d7 * Added ssl_quic_gnutls.c in the makefile to revert unnecessary changes due to previous rebase [skip ci] 2023-12-17 20:58:10 +01:00
8c660432a7 * Documentation for functions added [skip ci] 2023-12-17 20:58:09 +01:00
a9c198fbd9 * changes made to discard wget_http3_connection and use wget_http_connection for http3 [skip ci] 2023-12-17 20:58:09 +01:00
a987ea0e76 * 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
2023-12-17 20:58:09 +01:00
2564072c93 * 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
2023-12-17 20:58:03 +01:00
74a14d2cd1 * 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
2023-12-17 20:12:09 +01:00
f498822fb8 * 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
2023-12-17 20:12:09 +01:00
988131a401 * read for http3 working
* callback functions for closing the HTTP/3 and QUIC streams to be implemented.
2023-12-17 20:12:09 +01:00
d9017b8283 * 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()
2023-12-17 20:12:09 +01:00
5ae01a01f2 * ISSUE 2-8 : changes made in the code as per suggestions [skip ci]
* guarded functions and headers in quic.c and net.c using WITH_NGTCP2
* used wget_debug_printf and wget_error_printf in quic.c
* removed handshake_completed_db and handshake_confirmed_cb
* removed connection_write and connection_read
2023-12-17 20:12:09 +01:00
01950d5e91 * ISSUE 1: wget_dns_resolve_quic and wget_dns_resolve issue resolved [skip ci] 2023-12-17 20:12:01 +01:00
f3628ab839 * Changes internal implementation of byte to indicalte type of byte getting stored [skip ci]
* Also changes internal implementation of queue for testing a issue
* ISSUE : Example quic_read_write receives a packet twice
2023-12-17 20:08:06 +01:00
0ab20a5535 * some callback functions implemented and some improved for nghttp3 as well as ngtcp2 [skip ci]
* implemented a new function wget_quic_stream_set_stream to initialise a new stream with provided
  stream_id and add it to the wget_quic stack
2023-12-17 20:08:06 +01:00
fbe5561da7 * basic implementation of http3 stack over quic stack completed [skip ci]
* implementated very basic callback functions for http3
* implemented wget_http3_send_request to create a http3 requests
* reimplemented the internal working of wget_queue_peak_untransmitted
* example code for sending http3 request implemented
2023-12-17 20:08:06 +01:00
f667f2c826 * Changes made to fix resending of already sent data in wget_quic_write [skip ci]
* Added a bool in wget_byte struct named transmitted
* Implemented function wget_queue_peak_untransmitted_data
* This function will return first untransmitted byte
* Implemented wget_http3_deinit
2023-12-17 20:08:06 +01:00
f91c18cd8a * wget_http3_init implemented [skip ci]
* created http3.c and http3.h and implemented wget_http3_connection_st
* implemented http3 initialisation function to intialise the http3_connection struct
* shifted stream functions to a seperate stream.c file
2023-12-17 20:08:06 +01:00
9ba843978c * integrated nghttp3 with wget2 library [skip ci] 2023-12-17 20:08:06 +01:00
6803b4aadf * Changes made as per suggestions in wget_quic_rw_once [skip ci]
* wget_quic_rw_once will do read-write cycle once
* changes made for consistency with kernel coding style
2023-12-17 20:08:06 +01:00
da4bbb6656 * wget_quic_once implemented which does a complete write and read cycle [skip ci] 2023-12-17 20:08:06 +01:00
14945f984e * wget_quic_ack implemented [skip ci]
* The motivation for implementation is multiple number of packets
  sent from server for a single packet sent from client
2023-12-17 20:08:06 +01:00
14c82eac99 * Minor changes in other example codes [skip ci] 2023-12-17 20:08:06 +01:00
d53f19fc1d * Amendments made in the code as per suggestions [skip ci]
* Removed unnecessary getter-setter functions implemented
* implemented getter-setter for config in quic's ssl
2023-12-17 20:08:06 +01:00
0ec81fb379 * wget_quic_read function working [skip ci]
* quic_write_read.c file created to demonstrate the working of wget_quic_read
  and wget_quic_write hand in hand while configuring it to the QUIC ECHO server
2023-12-17 20:08:06 +01:00
3b99e07f49 * wget_quic_write function working [skip ci]
* quic_write.c file created to make provide a example of write.
* A sample string initially pushed into the stream and then the stream
  structure further utilised for sending the data over socket.
2023-12-17 20:08:06 +01:00
aad7bb1516 * Changes made in the code as per suggestions
* wget_quic_deinit added
* now the code has only wget_quic struct instead of two structs
* created new file named ssl_quic_gnutls.c
2023-12-17 20:08:06 +01:00
f8c95a9ad9 * QUIC Handshake working with QUIC Echo server [skip ci]
* Simplified the implementation of wget_quic_connect() and wget_ssl_quic_connect()
* Segregated the function wget_quic_connect into wget_quic_connect and wget_quic_handshake
2023-12-17 20:07:33 +01:00