It is not actually used anymore and only contained a dummy struct field.
Remove all traces and uses of it.
Closes #13927
/* struct for HTTP CONNECT tunneling */
struct h1_tunnel_state {
- struct HTTP CONNECT;
struct dynbuf rcvbuf;
struct dynbuf request_data;
size_t nsent;
{
/* allocate the HTTP-specific struct for the Curl_easy, only to survive
during this request */
- struct HTTP *http;
- DEBUGASSERT(data->req.p.http == NULL);
-
- http = calloc(1, sizeof(struct HTTP));
- if(!http)
- return CURLE_OUT_OF_MEMORY;
-
- data->req.p.http = http;
connkeep(conn, "HTTP default");
if(data->state.httpwant == CURL_HTTP_VERSION_3ONLY) {
CURLcode status, bool premature)
{
struct connectdata *conn = data->conn;
- struct HTTP *http = data->req.p.http;
/* Clear multipass flag. If authentication isn't done yet, then it will get
* a chance to be set back to true when we output the next auth header */
data->state.authhost.multipass = FALSE;
data->state.authproxy.multipass = FALSE;
- if(!http)
- return CURLE_OK;
-
Curl_dyn_reset(&data->state.headerb);
Curl_hyper_done(data);
const struct connectdata *conn,
const char *thisheader,
const size_t thislen);
-struct HTTP; /* see below */
CURLcode Curl_add_timecondition(struct Curl_easy *data,
#ifndef USE_HYPER
/****************************************************************************
* HTTP unique setup
***************************************************************************/
-struct HTTP {
- /* TODO: no longer used, we should remove it from SingleRequest */
- char unused;
-};
CURLcode Curl_http_size(struct Curl_easy *data);
(void)cf;
DEBUGASSERT(data);
- if(!data->req.p.http) {
- failf(data, "initialization failure, transfer not http initialized");
- return CURLE_FAILED_INIT;
- }
stream = H2_STREAM_CTX(ctx, data);
if(stream) {
*pstream = stream;
{
struct Curl_easy *second = curl_easy_duphandle(data);
if(second) {
- /* setup the request struct */
- struct HTTP *http = calloc(1, sizeof(struct HTTP));
- if(!http) {
- (void)Curl_close(&second);
- }
- else {
- struct h2_stream_ctx *second_stream;
-
- second->req.p.http = http;
- http2_data_setup(cf, second, &second_stream);
- second->state.priority.weight = data->state.priority.weight;
- }
+ struct h2_stream_ctx *second_stream;
+ http2_data_setup(cf, second, &second_stream);
+ second->state.priority.weight = data->state.priority.weight;
}
return second;
}
static void discard_newhandle(struct Curl_cfilter *cf,
struct Curl_easy *newhandle)
{
- if(newhandle->req.p.http) {
- http2_data_done(cf, newhandle);
- }
+ http2_data_done(cf, newhandle);
(void)Curl_close(&newhandle);
}
/* This is a bit ugly. `req->p` is a union and we assume we can
* free this safely without leaks. */
- Curl_safefree(req->p.http);
+ Curl_safefree(req->p.ftp);
Curl_safefree(req->newurl);
Curl_client_reset(data);
if(req->sendbuf_init)
{
/* This is a bit ugly. `req->p` is a union and we assume we can
* free this safely without leaks. */
- Curl_safefree(req->p.http);
+ Curl_safefree(req->p.ftp);
Curl_safefree(req->newurl);
if(req->sendbuf_init)
Curl_bufq_free(&req->sendbuf);
union {
struct FILEPROTO *file;
struct FTP *ftp;
- struct HTTP *http;
struct IMAP *imap;
struct ldapreqinfo *ldap;
struct MQTT *mqtt;
* RTSP unique setup
***************************************************************************/
struct RTSP {
- /*
- * http_wrapper MUST be the first element of this structure for the wrap
- * logic to work. In this way, we get a cheap polymorphism because
- * &(data->state.proto.rtsp) == &(data->state.proto.http) per the C spec
- *
- * HTTP functions can safely treat this as an HTTP struct, but RTSP aware
- * functions can also index into the later elements.
- */
- struct HTTP http_wrapper; /* wrap HTTP to do the heavy lifting */
-
long CSeq_sent; /* CSeq of this request */
long CSeq_recv; /* CSeq received */
};
struct cf_ngtcp2_ctx *ctx = cf->ctx;
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
- if(!data || !data->req.p.http) {
+ if(!data) {
failf(data, "initialization failure, transfer not http initialized");
return CURLE_FAILED_INIT;
}
struct cf_osslq_ctx *ctx = cf->ctx;
struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
- if(!data || !data->req.p.http) {
+ if(!data) {
failf(data, "initialization failure, transfer not http initialized");
return CURLE_FAILED_INIT;
}