32static const WCHAR test_winehq[] = {
't',
'e',
's',
't',
'.',
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',0};
33static const WCHAR tests_hello_html[] = {
'/',
't',
'e',
's',
't',
's',
'/',
'h',
'e',
'l',
'l',
'o',
'.',
'h',
't',
'm',
'l',0};
34static const WCHAR tests_redirect[] = {
'/',
't',
'e',
's',
't',
's',
'/',
'r',
'e',
'd',
'i',
'r',
'e',
'c',
't',0};
56#define NF_ALLOW 0x0001
57#define NF_WINE_ALLOW 0x0002
58#define NF_SIGNAL 0x0004
79 BOOL status_ok, function_ok;
172 "unexpected function %u, expected %u. probably some notifications were missing\n",
201 win_skip(
"Unload event not supported\n");
223 skip(
"connection failed, skipping\n");
254 skip(
"connection failed, skipping\n");
298 ok(
ret,
"failed to set unload option\n");
322 skip(
"connection failed, skipping\n");
353 skip(
"connection failed, skipping\n");
455 skip(
"connection failed, skipping\n");
522 win_skip(
"Unload event not supported\n");
534 ok(
ret,
"failed to set context value %u\n",
err);
541 ok(con !=
NULL,
"failed to open a connection %u\n",
err);
548 ok(req !=
NULL,
"failed to open a request %u\n",
err);
557 skip(
"connection failed, skipping\n");
564 ok(
ret,
"failed to send request %u\n",
err);
573 ok(
ret,
"failed to receive response %u\n",
err);
582 ok(
ret,
"failed unexpectedly %u\n",
err);
590 ok(
ret,
"failed to query data available %u\n",
err);
597 ok(
ret,
"failed to read data %u\n",
err);
626"Server: winetest\r\n"
631"<HEAD><TITLE>winhttp test page</TITLE></HEAD>\r\n"
632"<BODY>The quick brown fox jumped over the lazy dog<P></BODY>\r\n"
647 int r,
c = -1,
i, on;
652 int last_request = 0;
705 }
while (!last_request);
779 if (reuse_connection)
811 static const WCHAR socketW[] = {
'/',
's',
'o',
'c',
'k',
'e',
't',0};
843#define server_read_data(a) _server_read_data(a,__LINE__)
879 if (allow_closing_connection)
919#define read_request_data(a,b,c,d) _read_request_data(a,b,c,d,__LINE__)
926 if (closing_connection)
954 static const WCHAR testW[] = {
'/',
't',
'e',
's',
't',0};
956 trace(
"Testing persistent connection...\n");
962 "HTTP/1.1 200 OK\r\n"
963 "Server: winetest\r\n"
964 "Connection: keep-alive\r\n"
965 "Content-Length: 1\r\n"
975 "HTTP/1.1 200 OK\r\n"
976 "Server: winetest\r\n"
977 "Transfer-Encoding: chunked\r\n"
978 "Connection: keep-alive\r\n"
989 "HTTP/1.1 200 OK\r\n"
990 "Server: winetest\r\n"
991 "Content-Length: 2\r\n"
1000 "HTTP/1.1 200 OK\r\n"
1001 "Server: winetest\r\n"
1002 "Content-Length: 2\r\n"
1003 "Connection: close\r\n"
1014 static const WCHAR quitW[] = {
'/',
'q',
'u',
'i',
't',0};
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
ULONG WSAAPI inet_addr(IN CONST CHAR FAR *cp)
static struct sockaddr_in sa
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI WinHttpQueryOption(HINTERNET handle, DWORD option, LPVOID buffer, LPDWORD buflen)
HINTERNET WINAPI WinHttpOpen(LPCWSTR agent, DWORD access, LPCWSTR proxy, LPCWSTR bypass, DWORD flags)
HINTERNET WINAPI WinHttpConnect(HINTERNET hsession, LPCWSTR server, INTERNET_PORT port, DWORD reserved)
BOOL WINAPI WinHttpCloseHandle(HINTERNET handle)
HINTERNET WINAPI WinHttpOpenRequest(HINTERNET hconnect, LPCWSTR verb, LPCWSTR object, LPCWSTR version, LPCWSTR referrer, LPCWSTR *types, DWORD flags)
BOOL WINAPI WinHttpSetOption(HINTERNET handle, DWORD option, LPVOID buffer, DWORD buflen)
WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET handle, WINHTTP_STATUS_CALLBACK callback, DWORD flags, DWORD_PTR reserved)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR testW[]
static const struct notification close_request_test[]
static void open_async_request(int port, struct test_request *req, struct info *info, const WCHAR *path, BOOL reuse_connection)
static const struct notification server_reply_test[]
static DWORD CALLBACK server_thread(LPVOID param)
static const struct notification reuse_socket_request_test[]
static const struct notification async_test[]
static const char okmsg[]
static const struct notification cache_test[]
static const WCHAR test_winehq[]
static void test_connection_cache(void)
static const struct notification redirect_test[]
static const char page1[]
@ winhttp_receive_response
static const struct notification close_allow_connection_close_request_test[]
static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
static HANDLE server_socket_available
static const WCHAR tests_hello_html[]
static HANDLE server_socket_done
static void test_redirect(void)
static void setup_test(struct info *info, enum api function, unsigned int line)
static void _read_request_data(struct test_request *req, struct info *info, const char *expected_data, BOOL closing_connection, unsigned line)
#define server_read_data(a)
static void test_async(void)
static const struct notification read_test[]
static void _server_read_data(const char *expect_prefix, unsigned int line)
#define read_request_data(a, b, c, d)
static void CALLBACK check_notification(HINTERNET handle, DWORD_PTR context, DWORD status, LPVOID buffer, DWORD buflen)
static void test_persistent_connection(int port)
static const WCHAR localhostW[]
static const WCHAR user_agent[]
static const WCHAR tests_redirect[]
static void open_socket_request(int port, struct test_request *req, struct info *info)
static void server_send_reply(struct test_request *req, struct info *info, const char *msg)
static const struct notification open_socket_request_test[]
static const struct notification read_allow_close_test[]
BOOL WINAPI WinHttpQueryHeaders(HINTERNET hrequest, DWORD level, LPCWSTR name, LPVOID buffer, LPDWORD buflen, LPDWORD index)
BOOL WINAPI WinHttpReadData(HINTERNET hrequest, LPVOID buffer, DWORD to_read, LPDWORD read)
BOOL WINAPI WinHttpQueryDataAvailable(HINTERNET hrequest, LPDWORD available)
BOOL WINAPI WinHttpSendRequest(HINTERNET hrequest, LPCWSTR headers, DWORD headers_len, LPVOID optional, DWORD optional_len, DWORD total_len, DWORD_PTR context)
BOOL WINAPI WinHttpReceiveResponse(HINTERNET hrequest, LPVOID reserved)
INT WSAAPI setsockopt(IN SOCKET s, IN INT level, IN INT optname, IN CONST CHAR FAR *optval, IN INT optlen)
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
INT WSAAPI shutdown(IN SOCKET s, IN INT how)
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
const struct notification * test
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(void)
#define WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
#define WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE
#define WINHTTP_OPTION_CONTEXT_VALUE
#define WINHTTP_CALLBACK_STATUS_REDIRECT
#define WINHTTP_CALLBACK_STATUS_SENDING_REQUEST
#define WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT
#define ERROR_WINHTTP_CANNOT_CONNECT
#define WINHTTP_CALLBACK_STATUS_REQUEST_SENT
#define WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE
#define WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
#define WINHTTP_QUERY_STATUS_CODE
#define WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
#define WINHTTP_CALLBACK_STATUS_READ_COMPLETE
#define WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
#define WINHTTP_CALLBACK_FLAG_ALL_NOTIFICATIONS
#define WINHTTP_QUERY_FLAG_NUMBER
#define WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
#define WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
#define WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
#define WINHTTP_ACCESS_TYPE_NO_PROXY
#define WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE
#define WINHTTP_FLAG_ASYNC
#define WINHTTP_CALLBACK_STATUS_RESOLVING_NAME
#define WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
#define ERROR_WINHTTP_TIMEOUT
#define WINHTTP_CALLBACK_STATUS_HANDLE_CREATED