Skip to content

Commit 54ce13d

Browse files
committed
lib: rename struct 'http_req' to 'httpreq'
Because FreeBSD 14 kidnapped the name. Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271526 Fixes curl#11163 Closes curl#11164
1 parent 36e998b commit 54ce13d

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

lib/cf-h2-proxy.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ static CURLcode h2_submit(int32_t *pstream_id,
777777
struct Curl_cfilter *cf,
778778
struct Curl_easy *data,
779779
nghttp2_session *h2,
780-
struct http_req *req,
780+
struct httpreq *req,
781781
const nghttp2_priority_spec *pri_spec,
782782
void *stream_user_data,
783783
nghttp2_data_source_read_callback read_callback,
@@ -846,7 +846,7 @@ static CURLcode submit_CONNECT(struct Curl_cfilter *cf,
846846
{
847847
struct cf_h2_proxy_ctx *ctx = cf->ctx;
848848
CURLcode result;
849-
struct http_req *req = NULL;
849+
struct httpreq *req = NULL;
850850

851851
infof(data, "Establish HTTP/2 proxy tunnel to %s", ts->authority);
852852

lib/http.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -4537,13 +4537,13 @@ static char *my_strndup(const char *ptr, size_t len)
45374537
return copy;
45384538
}
45394539

4540-
CURLcode Curl_http_req_make(struct http_req **preq,
4540+
CURLcode Curl_http_req_make(struct httpreq **preq,
45414541
const char *method, size_t m_len,
45424542
const char *scheme, size_t s_len,
45434543
const char *authority, size_t a_len,
45444544
const char *path, size_t p_len)
45454545
{
4546-
struct http_req *req;
4546+
struct httpreq *req;
45474547
CURLcode result = CURLE_OUT_OF_MEMORY;
45484548

45494549
DEBUGASSERT(method);
@@ -4580,7 +4580,7 @@ CURLcode Curl_http_req_make(struct http_req **preq,
45804580
return result;
45814581
}
45824582

4583-
static CURLcode req_assign_url_authority(struct http_req *req, CURLU *url)
4583+
static CURLcode req_assign_url_authority(struct httpreq *req, CURLU *url)
45844584
{
45854585
char *user, *pass, *host, *port;
45864586
struct dynbuf buf;
@@ -4646,7 +4646,7 @@ static CURLcode req_assign_url_authority(struct http_req *req, CURLU *url)
46464646
return result;
46474647
}
46484648

4649-
static CURLcode req_assign_url_path(struct http_req *req, CURLU *url)
4649+
static CURLcode req_assign_url_path(struct httpreq *req, CURLU *url)
46504650
{
46514651
char *path, *query;
46524652
struct dynbuf buf;
@@ -4694,11 +4694,11 @@ static CURLcode req_assign_url_path(struct http_req *req, CURLU *url)
46944694
return result;
46954695
}
46964696

4697-
CURLcode Curl_http_req_make2(struct http_req **preq,
4697+
CURLcode Curl_http_req_make2(struct httpreq **preq,
46984698
const char *method, size_t m_len,
46994699
CURLU *url, const char *scheme_default)
47004700
{
4701-
struct http_req *req;
4701+
struct httpreq *req;
47024702
CURLcode result = CURLE_OUT_OF_MEMORY;
47034703
CURLUcode uc;
47044704

@@ -4738,7 +4738,7 @@ CURLcode Curl_http_req_make2(struct http_req **preq,
47384738
return result;
47394739
}
47404740

4741-
void Curl_http_req_free(struct http_req *req)
4741+
void Curl_http_req_free(struct httpreq *req)
47424742
{
47434743
if(req) {
47444744
free(req->scheme);
@@ -4778,7 +4778,7 @@ static bool h2_non_field(const char *name, size_t namelen)
47784778
}
47794779

47804780
CURLcode Curl_http_req_to_h2(struct dynhds *h2_headers,
4781-
struct http_req *req, struct Curl_easy *data)
4781+
struct httpreq *req, struct Curl_easy *data)
47824782
{
47834783
const char *scheme = NULL, *authority = NULL;
47844784
struct dynhds_entry *e;

lib/http.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ CURLcode Curl_http_decode_status(int *pstatus, const char *s, size_t len);
260260
/**
261261
* All about a core HTTP request, excluding body and trailers
262262
*/
263-
struct http_req {
263+
struct httpreq {
264264
char method[12];
265265
char *scheme;
266266
char *authority;
@@ -272,17 +272,17 @@ struct http_req {
272272
/**
273273
* Create a HTTP request struct.
274274
*/
275-
CURLcode Curl_http_req_make(struct http_req **preq,
275+
CURLcode Curl_http_req_make(struct httpreq **preq,
276276
const char *method, size_t m_len,
277277
const char *scheme, size_t s_len,
278278
const char *authority, size_t a_len,
279279
const char *path, size_t p_len);
280280

281-
CURLcode Curl_http_req_make2(struct http_req **preq,
281+
CURLcode Curl_http_req_make2(struct httpreq **preq,
282282
const char *method, size_t m_len,
283283
CURLU *url, const char *scheme_default);
284284

285-
void Curl_http_req_free(struct http_req *req);
285+
void Curl_http_req_free(struct httpreq *req);
286286

287287
#define HTTP_PSEUDO_METHOD ":method"
288288
#define HTTP_PSEUDO_SCHEME ":scheme"
@@ -306,7 +306,7 @@ void Curl_http_req_free(struct http_req *req);
306306
* @param data the handle to lookup defaults like ' :scheme' from
307307
*/
308308
CURLcode Curl_http_req_to_h2(struct dynhds *h2_headers,
309-
struct http_req *req, struct Curl_easy *data);
309+
struct httpreq *req, struct Curl_easy *data);
310310

311311
/**
312312
* All about a core HTTP response, excluding body and trailers

lib/http1.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define H1_PARSE_DEFAULT_MAX_LINE_LEN (8 * 1024)
3737

3838
struct h1_req_parser {
39-
struct http_req *req;
39+
struct httpreq *req;
4040
struct bufq scratch;
4141
size_t scratch_skip;
4242
const char *line;
@@ -53,7 +53,7 @@ ssize_t Curl_h1_req_parse_read(struct h1_req_parser *parser,
5353
const char *scheme_default, int options,
5454
CURLcode *err);
5555

56-
CURLcode Curl_h1_req_dprint(const struct http_req *req,
56+
CURLcode Curl_h1_req_dprint(const struct httpreq *req,
5757
struct dynbuf *dbuf);
5858

5959

0 commit comments

Comments
 (0)