Lines Matching refs:mem
56 BIO *mem; /* Mem BIO holding request header or response */ member
132 BIO_free(rctx->mem); in OSSL_HTTP_REQ_CTX_free()
148 return rctx->mem; in OSSL_HTTP_REQ_CTX_get0_mem_bio()
183 BIO_free(rctx->mem); in OSSL_HTTP_REQ_CTX_set_request_line()
184 if ((rctx->mem = BIO_new(BIO_s_mem())) == NULL) in OSSL_HTTP_REQ_CTX_set_request_line()
188 if (BIO_printf(rctx->mem, "%s ", rctx->method_POST ? "POST" : "GET") <= 0) in OSSL_HTTP_REQ_CTX_set_request_line()
196 if (BIO_printf(rctx->mem, OSSL_HTTP_PREFIX"%s", server) <= 0) in OSSL_HTTP_REQ_CTX_set_request_line()
198 if (port != NULL && BIO_printf(rctx->mem, ":%s", port) <= 0) in OSSL_HTTP_REQ_CTX_set_request_line()
210 } else if (path[0] != '/' && BIO_printf(rctx->mem, "/") <= 0) { in OSSL_HTTP_REQ_CTX_set_request_line()
217 if (BIO_printf(rctx->mem, "%s "HTTP_1_0"\r\n", path) <= 0) in OSSL_HTTP_REQ_CTX_set_request_line()
232 if (rctx->mem == NULL) { in OSSL_HTTP_REQ_CTX_add1_header()
237 if (BIO_puts(rctx->mem, name) <= 0) in OSSL_HTTP_REQ_CTX_add1_header()
240 if (BIO_write(rctx->mem, ": ", 2) != 2) in OSSL_HTTP_REQ_CTX_add1_header()
242 if (BIO_puts(rctx->mem, value) <= 0) in OSSL_HTTP_REQ_CTX_add1_header()
245 return BIO_write(rctx->mem, "\r\n", 2) == 2; in OSSL_HTTP_REQ_CTX_add1_header()
309 if (BIO_printf(rctx->mem, "Content-Type: %s\r\n", content_type) <= 0) in set1_content()
338 && BIO_printf(rctx->mem, "Content-Length: %ld\r\n", req_len) < 0) in set1_content()
350 BIO *mem = NULL; in OSSL_HTTP_REQ_CTX_set1_req() local
354 res = (mem = ASN1_item_i2d_mem_bio(it, req)) != NULL; in OSSL_HTTP_REQ_CTX_set1_req()
355 res = res && set1_content(rctx, content_type, mem); in OSSL_HTTP_REQ_CTX_set1_req()
356 BIO_free(mem); in OSSL_HTTP_REQ_CTX_set1_req()
558 if (rctx->mem == NULL || rctx->wbio == NULL || rctx->rbio == NULL) { in OSSL_HTTP_REQ_CTX_nbio()
587 if (BIO_write(rctx->mem, rctx->buf, n) != n) in OSSL_HTTP_REQ_CTX_nbio()
594 if (BIO_write(rctx->mem, "\r\n", 2) != 2) { in OSSL_HTTP_REQ_CTX_nbio()
602 rctx->len_to_send = BIO_get_mem_data(rctx->mem, &rctx->pos); in OSSL_HTTP_REQ_CTX_nbio()
632 (void)BIO_reset(rctx->mem); in OSSL_HTTP_REQ_CTX_nbio()
681 n = BIO_get_mem_data(rctx->mem, &p); in OSSL_HTTP_REQ_CTX_nbio()
689 n = BIO_gets(rctx->mem, buf, rctx->buf_size); in OSSL_HTTP_REQ_CTX_nbio()
692 if (BIO_should_retry(rctx->mem)) in OSSL_HTTP_REQ_CTX_nbio()
864 n = BIO_get_mem_data(rctx->mem, &p); in OSSL_HTTP_REQ_CTX_nbio()
906 n = BIO_get_mem_data(rctx->mem, NULL); in OSSL_HTTP_REQ_CTX_nbio()
924 *pval = ASN1_item_d2i(NULL, &p, BIO_get_mem_data(rctx->mem, &p), it); in OSSL_HTTP_REQ_CTX_nbio_d2i()
1006 return rctx->state == OHS_STREAM ? rctx->rbio : rctx->mem; in OSSL_HTTP_REQ_CTX_exchange()