mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
wolfIO_HttpBuildRequest_ex
This commit is contained in:
12
src/wolfio.c
12
src/wolfio.c
@ -1139,8 +1139,14 @@ int wolfIO_HttpProcessResponse(int sfd, const char** appStrList,
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wolfIO_HttpBuildRequest(const char *reqType, const char *domainName,
|
int wolfIO_HttpBuildRequest(const char *reqType, const char *domainName,
|
||||||
|
const char *path, int pathLen, int reqSz, const char *contentType,
|
||||||
|
byte *buf, int bufSize)
|
||||||
|
{
|
||||||
|
return wolfIO_HttpBuildRequest_ex(reqType, domainName, path, pathLen, reqSz, contentType, "", buf, bufSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
int wolfIO_HttpBuildRequest_ex(const char *reqType, const char *domainName,
|
||||||
const char *path, int pathLen, int reqSz, const char *contentType,
|
const char *path, int pathLen, int reqSz, const char *contentType,
|
||||||
const char *exHdrs, byte *buf, int bufSize)
|
const char *exHdrs, byte *buf, int bufSize)
|
||||||
{
|
{
|
||||||
@ -1250,7 +1256,7 @@ int wolfIO_HttpBuildRequestOcsp(const char* domainName, const char* path,
|
|||||||
int ocspReqSz, byte* buf, int bufSize)
|
int ocspReqSz, byte* buf, int bufSize)
|
||||||
{
|
{
|
||||||
const char *cacheCtl = "Cache-Control: no-cache";
|
const char *cacheCtl = "Cache-Control: no-cache";
|
||||||
return wolfIO_HttpBuildRequest("POST", domainName, path, (int)XSTRLEN(path),
|
return wolfIO_HttpBuildRequest_ex("POST", domainName, path, (int)XSTRLEN(path),
|
||||||
ocspReqSz, "application/ocsp-request", cacheCtl, buf, bufSize);
|
ocspReqSz, "application/ocsp-request", cacheCtl, buf, bufSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1364,7 +1370,7 @@ int wolfIO_HttpBuildRequestCrl(const char* url, int urlSz,
|
|||||||
const char* domainName, byte* buf, int bufSize)
|
const char* domainName, byte* buf, int bufSize)
|
||||||
{
|
{
|
||||||
const char *cacheCtl = "Cache-Control: no-cache";
|
const char *cacheCtl = "Cache-Control: no-cache";
|
||||||
return wolfIO_HttpBuildRequest("GET", domainName, url, urlSz, 0, "",
|
return wolfIO_HttpBuildRequest_ex("GET", domainName, url, urlSz, 0, "",
|
||||||
cacheCtl, buf, bufSize);
|
cacheCtl, buf, bufSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,6 +391,9 @@ WOLFSSL_API int BioReceive(WOLFSSL* ssl, char* buf, int sz, void* ctx);
|
|||||||
char* outPath, unsigned short* outPort);
|
char* outPath, unsigned short* outPort);
|
||||||
|
|
||||||
WOLFSSL_API int wolfIO_HttpBuildRequest(const char* reqType,
|
WOLFSSL_API int wolfIO_HttpBuildRequest(const char* reqType,
|
||||||
|
const char* domainName, const char* path, int pathLen, int reqSz,
|
||||||
|
const char* contentType, unsigned char* buf, int bufSize);
|
||||||
|
WOLFSSL_LOCAL int wolfIO_HttpBuildRequest_ex(const char* reqType,
|
||||||
const char* domainName, const char* path, int pathLen, int reqSz,
|
const char* domainName, const char* path, int pathLen, int reqSz,
|
||||||
const char* contentType, const char *exHdrs, unsigned char* buf, int bufSize);
|
const char* contentType, const char *exHdrs, unsigned char* buf, int bufSize);
|
||||||
WOLFSSL_API int wolfIO_HttpProcessResponse(int sfd, const char** appStrList,
|
WOLFSSL_API int wolfIO_HttpProcessResponse(int sfd, const char** appStrList,
|
||||||
|
Reference in New Issue
Block a user