summaryrefslogtreecommitdiff
path: root/crypto/http/http_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/http/http_lib.c')
-rw-r--r--crypto/http/http_lib.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/crypto/http/http_lib.c b/crypto/http/http_lib.c
index 614fd200b7c0..171cbb1b47a5 100644
--- a/crypto/http/http_lib.c
+++ b/crypto/http/http_lib.c
@@ -7,10 +7,10 @@
* https://www.openssl.org/source/license.html
*/
-#include <stdio.h> /* for sscanf() */
+#include <stdio.h> /* for sscanf() */
#include <string.h>
#ifndef OPENSSL_NO_SOCK
-# include "../bio/bio_local.h" /* for NI_MAXHOST */
+#include "../bio/bio_local.h" /* for NI_MAXHOST */
#endif
#include <openssl/http.h>
#include <openssl/httperr.h>
@@ -18,7 +18,7 @@
#include <openssl/err.h>
#include "internal/cryptlib.h" /* for ossl_assert() */
#ifndef NI_MAXHOST
-# define NI_MAXHOST 255
+#define NI_MAXHOST 255
#endif
#include "crypto/ctype.h" /* for ossl_isspace() */
@@ -51,8 +51,8 @@ static void free_pstring(char **pstr)
}
int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
- char **pport, int *pport_num,
- char **ppath, char **pquery, char **pfrag)
+ char **pport, int *pport_num,
+ char **ppath, char **pquery, char **pfrag)
{
const char *p, *tmp;
const char *scheme, *scheme_end;
@@ -162,11 +162,11 @@ int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
}
if (!copy_substring(pscheme, scheme, scheme_end)
- || !copy_substring(phost, host, host_end)
- || !copy_substring(pport, port, port_end)
- || !copy_substring(puser, user, user_end)
- || !copy_substring(pquery, query, query_end)
- || !copy_substring(pfrag, frag, frag_end))
+ || !copy_substring(phost, host, host_end)
+ || !copy_substring(pport, port, port_end)
+ || !copy_substring(puser, user, user_end)
+ || !copy_substring(pquery, query, query_end)
+ || !copy_substring(pfrag, frag, frag_end))
goto err;
if (pport_num != NULL)
*pport_num = (int)portnum;
@@ -182,10 +182,10 @@ int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
}
return 1;
- parse_err:
+parse_err:
ERR_raise(ERR_LIB_HTTP, HTTP_R_ERROR_PARSING_URL);
- err:
+err:
free_pstring(pscheme);
free_pstring(puser);
free_pstring(phost);
@@ -197,8 +197,8 @@ int OSSL_parse_url(const char *url, char **pscheme, char **puser, char **phost,
}
int OSSL_HTTP_parse_url(const char *url, int *pssl, char **puser, char **phost,
- char **pport, int *pport_num,
- char **ppath, char **pquery, char **pfrag)
+ char **pport, int *pport_num,
+ char **ppath, char **pquery, char **pfrag)
{
char *scheme, *port;
int ssl = 0, portnum;
@@ -207,7 +207,7 @@ int OSSL_HTTP_parse_url(const char *url, int *pssl, char **puser, char **phost,
if (pssl != NULL)
*pssl = 0;
if (!OSSL_parse_url(url, &scheme, puser, phost, &port, pport_num,
- ppath, pquery, pfrag))
+ ppath, pquery, pfrag))
return 0;
/* check for optional HTTP scheme "http[s]" */
@@ -244,7 +244,7 @@ int OSSL_HTTP_parse_url(const char *url, int *pssl, char **puser, char **phost,
}
return 1;
- err:
+err:
free_pstring(puser);
free_pstring(phost);
free_pstring(ppath);
@@ -283,15 +283,15 @@ static int use_proxy(const char *no_proxy, const char *server)
if (no_proxy != NULL)
found = strstr(no_proxy, server);
while (found != NULL
- && ((found != no_proxy && !ossl_isspace(found[-1]) && found[-1] != ',')
- || (found[sl] != '\0' && !ossl_isspace(found[sl]) && found[sl] != ',')))
+ && ((found != no_proxy && !ossl_isspace(found[-1]) && found[-1] != ',')
+ || (found[sl] != '\0' && !ossl_isspace(found[sl]) && found[sl] != ',')))
found = strstr(found + 1, server);
return found == NULL;
}
/* Take default value from environment variable(s), respect no_proxy */
const char *OSSL_HTTP_adapt_proxy(const char *proxy, const char *no_proxy,
- const char *server, int use_ssl)
+ const char *server, int use_ssl)
{
/*
* using environment variable names, both lowercase and uppercase variants,