Project

General

Profile

Fix-285-Remove-workaround-for-buggy-Opera-version.patch

stbuehler, 2008-02-16 14:29

View differences:

src/network_openssl.c
58 58
		SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN);
59 59
	}
60 60

  
61
	/* evil hack for opera 9.01 and 8.54 and earlier
62
	 *
63
	 * opera hangs if the trainling 0\r\n\r\n is in a seperate SSL-packet
64
	 *
65
	 * we try to move the packet into the previous mem-chunk if possible
66
	 */
67
	if ((cq == con->write_queue) &&
68
	    (con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) &&
69
	    (con->file_finished)) {
70
		/* merge the last chunk into the previous chunk */
71

  
72
		for(c = cq->first; c && c->next && c->next->next; c = c->next);
73

  
74
		if (c &&
75
		    c->type == MEM_CHUNK &&
76
		    c->next &&
77
		    c->next->type == MEM_CHUNK &&
78
		    c->next->mem->used == sizeof("0\r\n\r\n") &&
79
		    0 == strcmp(c->next->mem->ptr, "0\r\n\r\n")) {
80
			buffer_append_string_buffer(c->mem, c->next->mem);
81

  
82
			c->next->mem->used = 0;
83
		}
84
	}
85

  
86 61
	for(c = cq->first; c; c = c->next) {
87 62
		int chunk_finished = 0;
88 63

  
89
-