Subversion Repositories Tewi

Rev

Rev 20 | Rev 23 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 22
Line 1... Line 1...
1
/* $Id: http.c 20 2024-09-14 09:59:15Z nishi $ */
1
/* $Id: http.c 22 2024-09-14 13:25:38Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "tw_http.h"
5
#include "tw_http.h"
6
 
6
 
Line 57... Line 57...
57
		FD_ZERO(&fds);
57
		FD_ZERO(&fds);
58
		FD_SET(sock, &fds);
58
		FD_SET(sock, &fds);
59
		struct timeval tv;
59
		struct timeval tv;
60
		tv.tv_sec = 5;
60
		tv.tv_sec = 5;
61
		tv.tv_usec = 0;
61
		tv.tv_usec = 0;
-
 
62
		if(!SSL_has_pending(ssl)) {
62
		int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
63
			int n = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
63
		if(n == 0) break;
64
			if(n <= 0) {
-
 
65
				free(header);
-
 
66
				tw_free_request(req);
-
 
67
				return -1;
-
 
68
			}
-
 
69
		}
64
		int len = tw_read(ssl, sock, buffer, 512);
70
		int len = tw_read(ssl, sock, buffer, 512);
65
		if(len <= 0) break;
71
		if(len <= 0) break;
66
		int i;
72
		int i;
67
		for(i = 0; i < len; i++) {
73
		for(i = 0; i < len; i++) {
68
			char c = buffer[i];
74
			char c = buffer[i];