diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-01-18 12:37:47 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-23 15:25:04 +0100 |
commit | 046fba4493d6cb17e0b8b22f43d5ee63c2ff8d50 (patch) | |
tree | 2af271ef1539cada3d081f3b7d91a5868f412207 /doc | |
parent | cddbcf02f55e443c394f28768a20d0a7458cdb98 (diff) |
OSSL_HTTP_REQ_CTX_new(): replace method_GET parameter by method_POST
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13898)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man3/OSSL_HTTP_REQ_CTX.pod | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/doc/man3/OSSL_HTTP_REQ_CTX.pod b/doc/man3/OSSL_HTTP_REQ_CTX.pod index dc7020c826..d5188895bc 100644 --- a/doc/man3/OSSL_HTTP_REQ_CTX.pod +++ b/doc/man3/OSSL_HTTP_REQ_CTX.pod @@ -21,7 +21,7 @@ OSSL_HTTP_REQ_CTX_set_max_response_length typedef struct ossl_http_req_ctx_st OSSL_HTTP_REQ_CTX; OSSL_HTTP_REQ_CTX *OSSL_HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, - int method_GET, int maxline, + int method_POST, int maxline, unsigned long max_resp_len, int timeout, const char *expected_content_type, @@ -53,17 +53,19 @@ This file documents low-level HTTP functions rarely used directly. High-level HTTP client functions like L<OSSL_HTTP_get(3)> and L<OSSL_HTTP_transfer(3)> should be preferred. -OSSL_HTTP_REQ_CTX_new() allocates a new HTTP request context structure, which -gets populated with the B<BIO> to send the request to (I<wbio>), the B<BIO> to -read the response from (I<rbio>, which may be the same as I<wbio>), the -request method (I<method_GET>, which may be 1 to indicate that the C<GET> -method is to be used, or 0 to indicate that the C<POST> method is to be used), -the maximum expected response header length (I<max_resp_len>, where any zero -or less indicates the default of 4KiB), a response timeout measure in seconds -(I<timeout>, where 0 indicates no timeout, i.e., waiting indefinitely), the -expected MIME content type of the response (I<expected_content_type>, which -may be NULL for no expectation), and a flag indicating that the response is -expected to be a DER encoded ASN.1 structure (I<expect_asn1>). +OSSL_HTTP_REQ_CTX_new() allocates a new HTTP request context structure, +which gets populated with the B<BIO> to send the request to (I<wbio>), +the B<BIO> to read the response from (I<rbio>, which may be equal to I<wbio>), +the request method (I<method_POST>, which may be 1 to indicate that the C<POST> +method is to be used, or 0 to indicate that the C<GET> method is to be used), +the maximum expected response header length (I<max_resp_len>, +where any zero or less indicates the default of 4KiB), +a response timeout measure in seconds (I<timeout>, +where 0 indicates no timeout, i.e., waiting indefinitely), +the expected MIME content type of the response (I<expected_content_type>, +which may be NULL for no expectation), +and a flag indicating that the response is expected to be +a DER encoded ASN.1 structure (I<expect_asn1>). The allocated context structure is also populated with an internal allocated memory B<BIO>, which collects the HTTP request and additional headers as text. The returned context should only be used for a single HTTP request/response. @@ -73,8 +75,8 @@ The I<wbio> and I<rbio> are not free'd and it is up to the application to do so. OSSL_HTTP_REQ_CTX_set_request_line() adds the HTTP request line to the context. -The request command itself becomes C<GET> or C<POST> depending on the value -of I<method_GET> in the OSSL_HTTP_REQ_CTX_new() call. I<server> and I<port> +The request method itself becomes C<GET> or C<POST> depending on the value +of I<method_POST> in the OSSL_HTTP_REQ_CTX_new() call. I<server> and I<port> may be set to indicate a proxy server and port that the request should go through, otherwise they should be left NULL. I<path> is the HTTP request path; if left NULL, C</> is used. @@ -90,8 +92,8 @@ encoding of I<req>, using the ASN.1 template I<it> to do the encoding. The HTTP header C<Content-Length> is automatically filled out, and if I<content_type> isn't NULL, the HTTP header C<Content-Type> is also added with its content as value. All of this ends up in the internal memory B<BIO>. -This requires that the request type be C<POST>, i.e. that I<method_GET> is 0 -in the OSSL_HTTP_REQ_CTX_new() call. +This requires that the request type be C<POST>, +i.e., that I<method_POST> is 1 in the OSSL_HTTP_REQ_CTX_new() call. OSSL_HTTP_REQ_CTX_nbio() attempts the exchange of request and response via HTTP, using the I<rbio> and I<wbio> that were given in the OSSL_HTTP_REQ_CTX_new() @@ -138,7 +140,7 @@ Adding extra headers with OSSL_HTTP_REQ_CTX_add1_header(). This is optional. =item 3. Add C<POST> data with OSSL_HTTP_REQ_CTX_i2d(). This may only be done if -I<method_GET> was 0 in the OSSL_HTTP_REQ_CTX_new() call, and must be done +I<method_POST> was 1 in the OSSL_HTTP_REQ_CTX_new() call, and must be done exactly once in that case. =back |